Cron jobs

Status

  • On Spello, cron is running the following jobs for root:
    • rsync is synching /web/ucla to merton once an hour
    • updatedb once a day
    On Gubbio, cron is running this as root
    • ntpdate to synchronize the time with Spello (which runs an ntp daemon)
    • updatedb
    On Sigillio, cron is running this as root (should be running anacron instead)
    • ntpdate to synchronize the time with Spello (which runs an ntp daemon)
    • updatedb

Tools

  • remove non-existent users in /var/spool/cron/crontabs
  • kcron is the frontend for entering jobs
  • quick instructions
  • /var/spool/cron/crontabs/root (the currently active crontab)
  • add a job: crontab -l >> newjob | crontab newjob

1 June 2003

The new Gubbio (installed a fresh Debian from LordSutch in May) now has these jobs, copied from the KFA network:

just update && just auto-download >/dev/null 2>&1
updatedb
/usr/sbin/ntpdate spello

It's very convenient to have the new packages downloaded, even on my fast UCLA network.

11 February 2003

I found out about anacron, the scheduler that handles regular jobs on machines that don't stay on all the time.  There is some kind of complex link to cron jobs, and I couldn't figure out the exact logic of it. There are files in /etc/anacron and /etc/cron.daily (and weekly and monthly), in addition to files in /var/spool/anacron. Clearly an elaborate system. I just wanted to run ntpdate and updatedb occasionally. I may be you should also be running mandb as a cron job. Check out the scripts in /etc -- I didn't want to trigger all of that!


25 November 2002 update

For the earlier history, see rsync.

On 25 November 2002, I discovered that the Kcron interface is buggy -- it got set up for once a minute (which is a feature it doesn't even support) instead of once an hour, apparently by having the "Every day" box checked while all the other boxes were also checked. The workaround is to define all hours with some single exception.

I also discovered that each user has a crontab, located in /var/spool/cron/crontabs. The one I defined is root, as follows:

root:-55 * * * * rsync -rutv /mnt/winD/Webs/ucla/ /mnt/merton/ >/dev/null 2>&1

As you can see, I added a >/dev/null 2>&1 to turn off the hourly e-mail to /var/mail/nobody (for instructions, see http://weather.ou.edu/~billston/crontab/). I also added an updatedb --prunepaths='/mnt/novell' to be run at night. issue

tail -n 50 /var/log/syslog

to verify that the jobs are running as intended.

 

 

top
Debate
Evolution
CogSci

Maintained by Francis F. Steen, Communication Studies, University of California Los Angeles


CogWeb