Is cron command supposed to work like this?

Solution 1:

You don't need to call cron directly. Any commands you want to run need to be added to the crontab of the user they should run as. You can edit your crontab by running

crontab -e

or, if you are an admin user and want to edit the crontab of another user,

crontab -u USERNAME -e

PS: Run man 5 crontab for details about the format of the file, what kind of special commands you can use, and some samples. 5 * * * * /path/to/script seems to be ok though.

Solution 2:

On macOS High Sierra (and perhaps earlier), cron is disabled in some configurations. There is, however, still a LaunchDaemon for it.

Check to see if cron is enabled:

sudo launchctl list | grep cron

You should see com.vix.cron.plist if cron is running. If cron is not running, you should do:

sudo launchctl load -w /System/Library/LaunchDaemons/com.vix.cron.plist

That will start cron, and the -w switch will make sure it starts after reboots as well.