MacOS – way to have a scheduled task that will run later if MacOSX is asleep / off at the expected runtime

macosschedule

I want a backup task to run once a week.

The computer I want to do this is a laptop, that is often off / sleeping. I would like the task to run when the computer wakes, if the computer was asleep when it was supposed to run.

Otherwise the chance of anything actually getting backed up is pretty slim.

Is there an application or MacOSX feature that does this?

My understanding of cron jobs is that if the computer is not on when it's supposed to run they will not get run on awakening, so that doesn't look like what I want.

Best Answer

There are various mechanisms in Mac OS X to do scheduled tasks. They take a little bit of effort to configure, but this page (formerly elsewhere) explains it and has links to more info. The at service, which was a bit easier to use, is deprecated as it wastes battery, and is no longer enabled by default.

The main recommendation now is to create a launchd plist, although cron is still supported.