crontab update
Dan Mick
dan at charyb.COM
Sat Feb 24 12:32:45 AEST 1990
In article <855 at edstip.EDS.COM> ohrnb at edstip.EDS.COM (Erik Ohrnberger) writes:
>I have a question about the safest way to update the cron program's
>crontab file. What I currently do is update the crontab file, and then
>rebot the system, to make sure that cron program reads the updated contab
>file. Is all this required? Does the cron program re-read the crontab
>file everytime that it wakes up? Is there a special procedure to correctly
>update the crontab file?
RTFM. From the SunOS manual on cron:
Cron examines /usr/lib/crontab under the following condi-
tions:
o At least once per hour (on the hour).
o When the next command is to be run - cron looks ahead
until the next command and sleeps until then.
o When cron's process is sent a SIGHUP. This means that
someone who changes /usr/lib/crontab can get cron to look
at it right away.
So update crontab and do "ps ax | grep cron" to get cron's pid, then
"kill -HUP <pid>".
Of course, this isn't guaranteed to work except on SunOS 3.2; read your
man pages to be sure.
More information about the Comp.unix.questions
mailing list