Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to get a simple cron job to run on a Mac 10.5.8.

I'm following these instructions.

It says to edit the file /usr/crontab which doesn't exist for me, but I found /usr/bin/crontab.

However, when I do more crontab it shows me this:

enter image description here

How can I set up a simple cron job on this Mac?

share|improve this question

2 Answers 2

up vote 8 down vote accepted

Don't edit the actual crontab binary. That's a bit hardcore. :-)

Instead just type command

crontab -e

and edit your cron.

share|improve this answer
    
when I type crontab -e it allows me to edit /tmp/crontab.MEBcaEHqPt, is this what it is supposed to do, I set up cronjobs years ago and remember editing a file that already existed –  Edward Tanguay Jul 20 '11 at 9:06
1  
That /tmp/crontab.MEBcaEHqPt is just a temporary file name. When you save your cron from there, that temp file will be written over your real crontab. Using crontab -e is the official way of modifying your cron. –  Janne Pikkarainen Jul 20 '11 at 9:08
    
I thought it was possible to have multiple cron text files, is that not correct. Or is it the case that there is only one text file where all cronjobs are listed and you really don't know/care where it is, just always edit it via crontjob -e? –  Edward Tanguay Jul 20 '11 at 9:18
1  
cron files are per user, each user has their own. But you can put as many cronjobs as you need to your own crontab file. Each job goes to its own line. You don't need to care about the file location as long as you use crontab -e; the location tends to vary a bit depending on distribution/OS you use. The usual one is /var/spool/cron/username but you really don't need to care. :-) –  Janne Pikkarainen Jul 20 '11 at 9:29
    
helpful, got me going with this, thanks –  Edward Tanguay Jul 20 '11 at 9:31

theres a great little app called cronnix if you want to edit it mac style: http://code.google.com/p/cronnix/

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.