Tasks automatisation: the cron daemon

From Elvanör's Technical Wiki
Revision as of 13:36, 13 September 2007 by Elvanor (talk | contribs)
Jump to navigation Jump to search

Crontab Editing

  • You should not edit by hand /etc/crontab. This system wide file may not even exist (on Gentoo it does not exist for example). Instead use
crontab -e u username

This will edit the user crontab, and ensure that changes are notified to the crond daemon.

Crontab Debugging

  • When debugging crontab scripts, *make sure* that the script runs OK first. Run it as it would be loaded from the crontab daemon, and verify that no problems occur.

Notes

  • Some outdated articles on the Net do no longer apply to recent versions of OS X. In particular, there is no additional column in the crontab for the user under which the command is to be ran. The format is basically the same as in Linux.