Cron job on Mac not running during sleep

2

I have a cron job that will mail a list of all Google Tasks to my email address daily at 7am. (http://privacylog.blogspot.com/2010/07/api-for-google-tasks.html)

I am running this on my laptop which, like me, is in sleep mode at 7am.

Can I fix this to run after I wake the machine from sleep each day?

William Entriken

Posted 2010-07-29T13:55:50.607

Reputation: 2 014

Answers

6

If you use launchd instead of cron, tasks that were supposed to have ran while your Mac was sleeping will run when it wakes up. There's some more info (including usage) available here.

(For what it's worth, Apple recommends using launchd instead of cron, and may even phase out cron at some point in the future.)

mipadi

Posted 2010-07-29T13:55:50.607

Reputation: 3 980

For those who may look here, but are running systems other than OS X, such as Linux, take a look at anacron.

– Paused until further notice. – 2010-07-29T15:30:31.313