3

Using the command line of Mac OS X system, are at and crontab the correct utilities to use to schedule jobs/processes/scripts? Especially my own scripts.sh?

I am aware that both at and crontab (actually I am not sure about crontab) comes installed by default with Mac OS X but I have this feeling that I need to use something else in order to have it work properly on a Mac OS X system. Of course I am aware of third party application/software/mdm etc. but I am interested with what comes installed by default inside the Mac OS X.

1
  • 1
    at and cron are both installed by default. cron is technically deprecated, but works fine. at has not worked for the past several versions of macOS and I haven't been able to get it to work despite trying several suggestions found online. But launchd is definitely the right tool to use. I really like Lingon and LaunchControl. The latter also provides a tutorial website for launchd at <launchd.info>. FYI.
    – TJ Luoma
    Commented Sep 21, 2019 at 19:22

1 Answer 1

5

launchd

On macOS, launchd is Apple's replacement for cron. I don't know what the "official" replacement for at is.

See the StartCalendarInterval key in launchd.plist(5) to get started.

1
  • 1
    launchd is the prefeered way of replacing at see STartCalendarInterval note that if the machine is asleep then it will run the command on wake so much more like at than crontab
    – mmmmmm
    Commented Sep 21, 2019 at 11:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .