---
title: "Discussion on \"Why Your Mac's Scheduled Jobs Don't Run When the Lid Is Closed\" | Hashnode"
description: "Discussion on \"Why Your Mac's Scheduled Jobs Don't Run When the Lid Is Closed\". Cron silently skips runs while your MacBook sleeps. Learn how launchd catches up on wake, how pmset schedules a wake-up, and how to verify it worked."
url: "https://hashnode.com/posts/why-your-mac-s-scheduled-jobs-don-t-run-when-the-lid-is-closed-2lrqn/6b1267e7e97d8d47580cab26"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Why Your Mac's Scheduled Jobs Don't Run When the Lid Is Closed](https://blog.zyvop.com/why-your-mac-s-scheduled-jobs-don-t-run-when-the-lid-is-closed-2lrqn?utm_source=hashnode&utm_medium=feed)

Cron silently skips runs while your MacBook sleeps. Learn how launchd catches up on wake, how pmset schedules a wake-up, and how to verify it worked.

10h ago · 7 min read · blog.zyvop.com  
Read the article

-   [#automation](https://hashnode.com/tag/automation)
-   [#cron](https://hashnode.com/tag/cron)
-   [#launchd](https://hashnode.com/tag/launchd)
-   [#macos](https://hashnode.com/tag/macos)
-   [#scheduling](https://hashnode.com/tag/scheduling)

## Written by

[ZyVOP](https://hashnode.com/@zyvop)

@zyvop · Delhi, India

  
[View profile](https://hashnode.com/@zyvop)

The Developer Publishing Hub

One platform to write, cross-post to Dev.to, Medium, WordPress, Hashnode, and Bluesky, and protect your SEO with canonical links. Zero paywalls and full content ownership.

## Responses 4

Markdown supported · ⌘↵ to post

[Olivia](https://hashnode.com/@oliviacreates)

[1h ago](https://hashnode.com/posts/why-your-mac-s-scheduled-jobs-don-t-run-when-the-lid-is-closed-2lrqn/6b1267e7e97d8d47580cab26/comment/6b12dffcdb35cb89c5a5daaf)

The wildcard gotcha is the one that would have caught me — setting only Hour and getting a run every minute of that hour. The stamp-file-after-success tip is a good one too; a failed late run shouldn't count as done.

[ZyVOP](https://hashnode.com/@zyvop)

[1h ago](https://hashnode.com/posts/why-your-mac-s-scheduled-jobs-don-t-run-when-the-lid-is-closed-2lrqn/6b1267e7e97d8d47580cab26/comment/6b12dffcdb35cb89c5a5daaf#reply-6b12e11d042ddc443fd875b6)

Exactly. The wildcard behavior is easy to overlook because the configuration still looks valid at first glance. And the completion stamp should only be written after the backup finishes successfully. Otherwise, a failed run can silently make the next attempt think everything is already done.

[Lazar Bukejlovic](https://hashnode.com/@izracunpostotka)

[6h ago](https://hashnode.com/posts/why-your-mac-s-scheduled-jobs-don-t-run-when-the-lid-is-closed-2lrqn/6b1267e7e97d8d47580cab26/comment/6b129f62c5784c3a842fb8b0)

Really clear breakdown — the part about StartCalendarInterval only catching up runs missed during sleep (not shutdown) saved me a lot of confusion. I had a nightly backup that kept silently skipping and I assumed cron was just flaky. One thing I'd add from my own setup: setting both Hour and Minute is easy to miss, and without Minute it fires every minute of that hour. Also worth checking pmset -g log the morning after, like you said — that's how I finally caught that my wake was only a dark wake and the job never really ran. Thanks for writing this up so practically.

[ZyVOP](https://hashnode.com/@zyvop)

[1h ago](https://hashnode.com/posts/why-your-mac-s-scheduled-jobs-don-t-run-when-the-lid-is-closed-2lrqn/6b1267e7e97d8d47580cab26/comment/6b129f62c5784c3a842fb8b0#reply-6b12df5fef6b35ab75a801d2)

Glad you found it useful! The dark wake distinction is particularly important because a scheduled wake doesn't always mean the machine is fully awake and ready to run everything. And yes, specifying both Hour and Minute is a small detail that can cause surprisingly confusing behavior. Did you eventually get your backup running reliably with `pmset`, or did you switch to another approach?
