26

I want to edit my crontab file to schedule a script. Where do I find it?

16

If you don't want to use launchd, you can edit your crontab as you would do on any unix systems :

crontab -e

Or, you can use a GUI software like CronniX.

  • 2
    And if you want to see your crontab content use crontab -l – Ermiar Sep 4 '10 at 13:06
  • 1
    I would highly recommend CronniX. It provides a much (much!) easier way of setting up cronjobs. – daviesgeek Nov 10 '11 at 7:52
23

In Mac OS X Lion the user crontabs are stored in /var/at/tabs. In the past they were located in /var/cron/tabs.

You should use crontab -e to interact with these in general, but knowing the location is useful for when you want to restore them from a backup of your disk, or something similar.

  • In Snow Leopard, the user crontabs are stored in /var/cron/tabs, as well. – Jack Humphries Nov 22 '14 at 16:22
  • 3
    On my mac (v10.11, el capitan) I found it in /private/var/at/tabs/. I used find / -iname *cron*. – AlexMA Aug 26 '16 at 15:04
6

The OS X way is to use launchctl to run jobs at a time.

For ease of use there are GUIs called Launch Control and Lingon.

2

It should be noted that if you aren't accustomed to using vim (the default crontab editor) then you can specify your editor as follows:

export VISUAL=nano; crontab -e
  • It^s actually enough to run VISUAL=nano crontab -e for this. – nohillside Jun 25 at 20:51

You must log in to answer this question.

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