I wanted to know what time of day my cron.daily, cron.weekly, etc. cron jobs where scheduled to run. The answer is in /etc/crontab:
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.
# m h dom mon dow user command
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
Thanks to this handy document How To Set Cron to Run Every 5 Minutes I now my crontab configured so that my jj5-test repo gets updated every five minutes. It’s the sort of thing I generally do in a post-commit hook, but in this case that won’t work owing to the way the servers are configured (the files are in my account and not owned by the www-data user the commit-hook runs as).
So to configure cron I issued the command:
$ crontab -e
And then to update my svn working copy:
# m h dom mon dow command
*/5 * * * * cd /home/jj5/web/test && svn update > /dev/null
I’m setting up some backup scripts and am using cron to schedule them to run. Usually I run my backup scripts as root and just link a file into /etc/cron.*/ for periodic processing. However in this case I need to run the backup scripts as my user (they’re offsite backup scripts that use rsync to copy data) and not root, so I used crontab -e to edit my crontab. I did a little reading on crontab and learned about the @weekly syntax which I’ve used for the first time today. Now I guess I just wait a week and see that everything is working. :)