crond with slackware 9.0 question

Adam Myrow amyrow at midsouth.rr.com
Sun Apr 6 06:05:35 EDT 2003


It should be executing cron like before.  Did it set up a new crontab as
root?  Look at that crontab.  All it does is to call a script called
run-parts and has that run any executable scripts in /etc/cron.hourly
every hour.  It runs the executable scripts in cron.daily every day at a
certain time which you can edit.  The same goes for cron.weekly, monthly,
etc.  You could put your normal crontabs below that.  If it isn't running
at all, are you sure crond is even running?  As root, type "pgrep crond"
or the longer, but more informative "ps -ef | grep crond | grep -v grep."
The second grep in that command removes the first grep from the ps output.
It's sort of like the lady who swallowed the bird to catch the spider and
swallowed the spider to catch the fly.  The first "pgrep" command showed
up some time in Slackware, but I never knew of it until I played with
Solaris which is where that command originated.  Oh yes, getting back to
crond.  If you are sure it's running, but your crontab entries are not,
change its invokation in /etc/rc.d/rc.M so that the "-l10" at the end
becomes a "-l8."  Then, either reboot or manually kill and restart crond
being sure to pass the "-l8" yourself.  This will, as explained in the
script, make crond log every cron job that runs and what happened in a
file called /var/log/cron.  An example entry from that file is:

Apr  6 04:47:01 homerun crond[135]: USER root pid 11907 cmd
/usr/bin/run-parts /etc/cron.hourly 1> /dev/null

In this case, it is nice to have the logrotate package installed to manage
your logs.  It is set up fairly nice by default and first appeared in
Slackware 8.1.





More information about the Speakup mailing list