Run Shell Scripts on a Schedule

Solution 1:

If there is a “right” way from Apple’s point of view, then it’s launchd. Not that cron is “wrong” per se but it is not the “preferred” way.

However, as you indicated, launchd can be a pain to work with.

There are two good apps to try:

  1. https://www.soma-zone.com/LaunchControl/ ¹

  2. https://www.peterborgapps.com/lingon/

Lingon has been around for a long time and is probably better known, but I switched to LaunchControl a few years ago and much prefer it.

The developer also maintains https://launchd.info which is a helpful tutorial website to understand how launchd works.

LaunchControl also has a built-in tool that can mitigate issues around Full Disk Access, making it easier to deal with macOS' restrictions.


There is another, simpler option: Keyboard Maestro. Not only does Keyboard Maestro have a feature to run scripts (or macros, etc) at a specific time or recurring every X minutes, but you can also use cron-style syntax if you want.

Given that Keyboard Maestro is the best automation tool for the Mac, and I'd probably sacrifice a finger rather than be forced to use a Mac without it, you can guess that I strongly recommend Keyboard Maestro. It has a free trial (for other 2 weeks or 30 days, I'm not sure, but it's definitely a long time) and is actively maintained.


¹ As of this writing, both the LaunchControl website and launchd.info site appear to be down, which I assume is just a temporary glitch. They were working as recently as last night. If it is still down when you read this, you can download a copy of the latest version (which also has a free trial) from my website here:

https://iusethis.luo.ma/launchcontrol/LaunchControl-1.52.3.tbz2