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


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.

| improve this answer | |
  • 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

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.

| improve this answer | |
  • 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
  • AlexMA is correct, and on 10.12 (and above) you may need to become 'root' to have permission to access these tables, which have usernames. I use 'sudo bash' to become 'root', and 'exit' when I'm done. – Dickster Oct 9 '19 at 18:15

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.

| improve this answer | |

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
| improve this answer | |
  • It^s actually enough to run VISUAL=nano crontab -e for this. – nohillside Jun 25 '19 at 20:51

You must log in to answer this question.

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