crond problem

Julien MARBACH jmarbach at quelisid.com
Fri Dec 2 18:58:17 UTC 2005


Hello,
I'm trying to use the crond of busybox 1.0. I've searched the list 
archives for instrucions about how to solve my problem but I found 
nothing clear.
Here is the problem :
I've a startup script that launches crond and set the crontabs
$ cat /etc/rcS.d/S40crond
#!/bin/sh
#Setting up the cron daemon confguration
mkdir -p /var/spool/cron/crontabs
# Copying the crontab file
/usr/bin/crontab /etc/crontab
/usr/sbin/crond

Here is my crontab file :
$ cat /etc/crontab
#SHELL=/bin/sh
#PATH=/sbin:/bin:/usr/sbin:/usr/bin
#MAILTO=root
#HOME=/

# run-parts
01 * * * * root /bin/run-parts /etc/cron.hourly
02 4 * * * root /bin/run-parts /etc/cron.daily
22 4 * * 0 root /bin/run-parts /etc/cron.weekly
42 4 1 * * root /bin/run-parts /etc/cron.monthly

And here the hourly script :
$ cat /etc/cron.hourly/syslog_backup_script
#!/bin/sh
cat /var/log/messages > /var/log/messages.bak
echo -n "" > /var/log/messages

Here is what i can see in syslog :

Jan  1 02:00:18 (none) syslog.info -- MARK --
Jan  1 02:01:01 (none) kern.notice crond[944]: USER root pid 1123 cmd 
root /bin/run-parts /etc/cron.hourly
Jan  1 02:20:18 (none) syslog.info -- MARK --
Jan  1 02:40:18 (none) syslog.info -- MARK --
Jan  1 03:00:18 (none) syslog.info -- MARK --
Jan  1 03:01:01 (none) kern.notice crond[944]: USER root pid 1124 cmd 
root /bin/run-parts /etc/cron.hourly
Jan  1 03:20:18 (none) syslog.info -- MARK --
Jan  1 03:40:18 (none) syslog.info -- MARK --
Jan  1 04:00:18 (none) syslog.info -- MARK --
Jan  1 04:01:01 (none) kern.notice crond[944]: USER root pid 1125 cmd 
root /bin/run-parts /etc/cron.hourly
Jan  1 04:02:01 (none) kern.notice crond[944]: USER root pid 1126 cmd 
root /bin/run-parts /etc/cron.daily
Jan  1 04:20:18 (none) syslog.info -- MARK --
Jan  1 04:40:18 (none) syslog.info -- MARK --
Jan  1 04:42:01 (none) kern.notice crond[944]: USER root pid 1127 cmd 
root /bin/run-parts /etc/cron.monthly
Jan  1 05:00:18 (none) syslog.info -- MARK --
Jan  1 05:01:01 (none) kern.notice crond[944]: USER root pid 1128 cmd 
root /bin/run-parts /etc/cron.hourly
Jan  1 05:20:18 (none) syslog.info -- MARK --
Jan  1 05:40:18 (none) syslog.info -- MARK --
Jan  1 06:00:18 (none) syslog.info -- MARK --
Jan  1 06:01:01 (none) kern.notice crond[944]: USER root pid 1129 cmd 
root /bin/run-parts /etc/cron.hourly
Jan  1 06:20:18 (none) syslog.info -- MARK --
Jan  1 06:40:18 (none) syslog.info -- MARK --
Jan  1 07:00:18 (none) syslog.info -- MARK --
Jan  1 07:01:01 (none) kern.notice crond[944]: USER root pid 1130 cmd 
root /bin/run-parts /etc/cron.hourly
Jan  1 07:20:18 (none) syslog.info -- MARK --
Jan  1 07:40:18 (none) syslog.info -- MARK --

As you can see in syslog, cron seems to have executed the scripts but in 
fact it has done nothing...

Do you have any idea of what happens here?

Thanks

Julien




More information about the busybox mailing list