Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Oneechan69

macrumors 6502
Original poster
Mar 29, 2022
280
32
US
I just want to simply run a mv terminal command everyday at midnight, but if my Mac is asleep or off and it misses that time, then it runs the command as soon as it can once it wakes up / turns on and I'm logged in. I know cron is popular utility for doing this, but macOS launchd, which is supposed to replace cron.

Cron is used a lot on Linux distros and I imagine that a lot of guides I find for cron and questions on SO / StackExchange would apply to macOS as well, especially if I installed it with the command brew install cron. However Launchd has a lot more to it than scheduling tasks from the little bit of reading I've done, should I use it if its possible I'd want to do other things with Launchd in the future? Possibly use it macOS tasks or automations for things I'd do in the future but not today?

Which is simpler, and which would you recommend?
 
cron is not a recommended solution and launchd has superseded.

Do note that cron is a built-in utility (/usr/sbin/cron). brew install cron will install a different app.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.