Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Using the 'cron' scheduler' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Using the 'cron' scheduler
Authored by: icerunner on Jul 02, '10 02:00:08AM

Rather than copy the system cron file and edit in a text editor you can use the command

crontab -e

which brings up your crontab for editing in the 'vi' editor. When you save your changes it will then parse the crontab you have set up and warn you if there are any obvious errors in it.

man crontab
man 5 crontab
man vi



[ Reply to This | # ]
Using an external text editor for crontab
Authored by: Peter Kappesser on Feb 08, '11 07:23:19AM
TextWrangler's (and its "poppa" BBEdit's) edit command line tool can be used to edit the crontab file, following the setup instructions on its man page -- note that you have to write a little "helper" shell script to invoke edit with the -w option in order to work around a limitation in crontab.

I've used this for years, but it broke suddenly with the TextWrangler 3.5.3 update, with the error "crontab: temp file must be edited in place". This is because the new version of TextWrangler brought in some code from BBEdit which observes a new expert preference. To fix it, quit TextWrangler and execute the following in Terminal:

defaults write com.barebones.textwrangler Filing:SafeSavesDisabled -bool YES
I can't speak to the implications of disabling safe saves, however.

[ Reply to This | # ]