For some reason, cron seems to have stopped running users' tasks this morning. I'm not sure if it will run system tasks (cron.daily, cron.weekly, etc.). BTW, I'm running Suse 10.1 . It worked fine during the night (around 00:30), running a backup of the / partition. The task is in root's crontab. However, now it won't run any task in any user crontab, including root. The times for several tasks have come and gone and none of them have been executed. I checked and the cron daemon is running: ps -ax | grep cron 4557 ? Ss 0:00 /usr/sbin/cron Below is a copy of a crontab which should have run this morning. The times have been changed several times this morning trying to figure out what is happening: # dar backup of / partition 30 0 * * 7 /root/full_system_dar_backup.sh # dar backup of /home partition 10 13 * * 7 /root/full_home_dar_backup.sh 30 0 * * 1,2,3,4,5,7 /root/diff_system_dar_backup.sh 55 7 * * 1,2,3,4,5,7 /root/diff_home_dar_backup.sh This also happening with the cron jobs of regular users. Any help is greatly appreciated. Rick
On Sunday 03 September 2006 14:12, Rick Friedman wrote:
Below is a copy of a crontab which should have run this morning. The times have been changed several times this morning trying to figure out what is happening:
# dar backup of / partition 30 0 * * 7 /root/full_system_dar_backup.sh
# dar backup of /home partition 10 13 * * 7 /root/full_home_dar_backup.sh
30 0 * * 1,2,3,4,5,7 /root/diff_system_dar_backup.sh
55 7 * * 1,2,3,4,5,7 /root/diff_home_dar_backup.sh
This also happening with the cron jobs of regular users.
Do you get any messages in /var/log/messages when a job is meant to run? Can you run the problematic scripts manually? did this ever work through cron?
On Sun, 2006-09-03 at 14:31 +0200, Anders Johansson wrote:
On Sunday 03 September 2006 14:12, Rick Friedman wrote:
Below is a copy of a crontab which should have run this morning. The times have been changed several times this morning trying to figure out what is happening:
# dar backup of / partition 30 0 * * 6 /root/full_system_dar_backup.sh
# dar backup of /home partition 10 13 * * 6 /root/full_home_dar_backup.sh
30 0 * * 1,2,3,4,5,7 /root/diff_system_dar_backup.sh
55 7 * * 1,2,3,4,5,7 /root/diff_home_dar_backup.sh
This also happening with the cron jobs of regular users.
Do you get any messages in /var/log/messages when a job is meant to run?
Can you run the problematic scripts manually?
did this ever work through cron?
Running these scripts manually works fine. It's not just these scripts which are not being executed but those of other users as well. As for messages in /var/log/messages, at 00:30 today, a message shows that cron ran the above task /root/diff_system_dar_backup.sh: Sep 3 00:30:01 chisum /usr/sbin/cron[6109]: (root) CMD (/root/diff_system_dar_backup.sh) At 7:55, when the task /root/diff_home_dar_backup.sh should've run, the only message that appears is: Sep 3 07:55:01 chisum /usr/sbin/cron[4557]: (root) RELOAD (tabs/root) These tasks had been running fine through cron until this morning. I've tried restarting cron several times. I've also rebooted but to no avail.
On Sunday 03 September 2006 16:07, Rick Friedman wrote:
At 7:55, when the task /root/diff_home_dar_backup.sh should've run, the only message that appears is:
Sep 3 07:55:01 chisum /usr/sbin/cron[4557]: (root) RELOAD (tabs/root)
reload? Did you change the crontab for root manually at 7.54? If you do edit crontab, note that (unless something has changed recently) because of the way cron handles times, you need to give it two minutes head start. In other words, if you make a change at 7.54, the earliest it will run is 7.56 (at least this used to be a bug, I haven't checked if it has been fixed recently)
These tasks had been running fine through cron until this morning. I've tried restarting cron several times. I've also rebooted but to no avail.
Strange. Have a look at the crontab file in a hex editor, and see if perhaps the characters following the 7 are something strange. cron can only handle spaces and tabs
Being systematic: - Check if the crond deamon stoped or; - Is the clock time right? (far fetch, but possible)... LC On 3 September de 2006 13:12, Rick Friedman wrote:
For some reason, cron seems to have stopped running users' tasks this morning. I'm not sure if it will run system tasks (cron.daily, cron.weekly, etc.). BTW, I'm running Suse 10.1 .
It worked fine during the night (around 00:30), running a backup of the / partition. The task is in root's crontab. However, now it won't run any task in any user crontab, including root. The times for several tasks have come and gone and none of them have been executed.
I checked and the cron daemon is running:
ps -ax | grep cron 4557 ? Ss 0:00 /usr/sbin/cron
Below is a copy of a crontab which should have run this morning. The times have been changed several times this morning trying to figure out what is happening:
# dar backup of / partition 30 0 * * 7 /root/full_system_dar_backup.sh
# dar backup of /home partition 10 13 * * 7 /root/full_home_dar_backup.sh
30 0 * * 1,2,3,4,5,7 /root/diff_system_dar_backup.sh
55 7 * * 1,2,3,4,5,7 /root/diff_home_dar_backup.sh
This also happening with the cron jobs of regular users.
Any help is greatly appreciated.
Rick
On Sun, 2006-09-03 at 08:12 -0400, Rick Friedman wrote:
For some reason, cron seems to have stopped running users' tasks this morning. I'm not sure if it will run system tasks (cron.daily, cron.weekly, etc.). BTW, I'm running Suse 10.1 .
It worked fine during the night (around 00:30), running a backup of the / partition. The task is in root's crontab. However, now it won't run any task in any user crontab, including root. The times for several tasks have come and gone and none of them have been executed.
I checked and the cron daemon is running:
ps -ax | grep cron 4557 ? Ss 0:00 /usr/sbin/cron
Looking in /var/log/messages is definitely a good thing to do. You can check what cron is doing a little more with strace (as root): # strace -p 4557 On my 9.3 system I see something like this: Process 7756 attached - interrupt to quit restart_syscall(0x7fffffffea10, 0x7fffffffea10, 0, 0x8, 0x7fffffffe870) = 0 stat("tabs", {st_mode=S_IFDIR|0700, st_size=48, ...}) = 0 stat("/etc/cron.d", {st_mode=S_IFDIR|0755, st_size=48, ...}) = 0 stat("/etc/crontab", {st_mode=S_IFREG|0644, st_size=255, ...}) = 0 stat("/etc/cron.d", {st_mode=S_IFDIR|0755, st_size=48, ...}) = 0 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 rt_sigaction(SIGCHLD, NULL, {0x4024e0, [], SA_RESTORER|SA_RESTART, 0x2aaaaadfbf00}, 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 nanosleep({60, 0}, {60, 0}) = 0 stat("tabs", {st_mode=S_IFDIR|0700, st_size=48, ...}) = 0 stat("/etc/cron.d", {st_mode=S_IFDIR|0755, st_size=48, ...}) = 0 stat("/etc/crontab", {st_mode=S_IFREG|0644, st_size=255, ...}) = 0 stat("/etc/cron.d", {st_mode=S_IFDIR|0755, st_size=48, ...}) = 0 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 The stats occur every minute as it checks the files.
This also happening with the cron jobs of regular users.
Just to confirm - you are saying that you have existing cronjobs that were working and that you haven't touched but now don't run? So the problem is with cron rather than the new script. Cheers, Dave
On Sun, 2006-09-03 at 15:00 +0100, Dave Howorth wrote:
On Sun, 2006-09-03 at 08:12 -0400, Rick Friedman wrote:
For some reason, cron seems to have stopped running users' tasks this morning. I'm not sure if it will run system tasks (cron.daily, cron.weekly, etc.). BTW, I'm running Suse 10.1 .
It worked fine during the night (around 00:30), running a backup of the / partition. The task is in root's crontab. However, now it won't run any task in any user crontab, including root. The times for several tasks have come and gone and none of them have been executed.
I checked and the cron daemon is running:
ps -ax | grep cron 4557 ? Ss 0:00 /usr/sbin/cron
Looking in /var/log/messages is definitely a good thing to do.
You can check what cron is doing a little more with strace (as root):
# strace -p 4557
On my 9.3 system I see something like this:
Process 7756 attached - interrupt to quit restart_syscall(0x7fffffffea10, 0x7fffffffea10, 0, 0x8, 0x7fffffffe870) = 0 stat("tabs", {st_mode=S_IFDIR|0700, st_size=48, ...}) = 0 stat("/etc/cron.d", {st_mode=S_IFDIR|0755, st_size=48, ...}) = 0 stat("/etc/crontab", {st_mode=S_IFREG|0644, st_size=255, ...}) = 0 stat("/etc/cron.d", {st_mode=S_IFDIR|0755, st_size=48, ...}) = 0 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 rt_sigaction(SIGCHLD, NULL, {0x4024e0, [], SA_RESTORER|SA_RESTART, 0x2aaaaadfbf00}, 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 nanosleep({60, 0}, {60, 0}) = 0 stat("tabs", {st_mode=S_IFDIR|0700, st_size=48, ...}) = 0 stat("/etc/cron.d", {st_mode=S_IFDIR|0755, st_size=48, ...}) = 0 stat("/etc/crontab", {st_mode=S_IFREG|0644, st_size=255, ...}) = 0 stat("/etc/cron.d", {st_mode=S_IFDIR|0755, st_size=48, ...}) = 0 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
The stats occur every minute as it checks the files.
This also happening with the cron jobs of regular users.
Just to confirm - you are saying that you have existing cronjobs that were working and that you haven't touched but now don't run? So the problem is with cron rather than the new script.
Cheers, Dave
First, thanks for the help. I ran strace on the cron process and received this: Process 4557 attached - interrupt to quit restart_syscall(<... resuming interrupted call ...>) = 0 time(NULL) = 1157292541 time(NULL) = 1157292541 stat64("tabs", {st_mode=S_IFDIR|0700, st_size=672, ...}) = 0 stat64("/etc/cron.d", {st_mode=S_IFDIR|0755, st_size=48, ...}) = 0 stat64("/etc/crontab", {st_mode=S_IFREG|0644, st_size=255, ...}) = 0 stat64("/etc/cron.d", {st_mode=S_IFDIR|0755, st_size=48, ...}) = 0 time(NULL) = 1157292541 rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0 rt_sigaction(SIGCHLD, NULL, {0x80002150, [], SA_RESTART}, 8) = 0 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0 nanosleep({60, 0}, {60, 0}) = 0 I have no idea what any of it means. Yes, the problem seems to be with cron and not the scripts themselves. Cron was running task fine during the night. Suddenly, it seems to not be running any tasks. Rick
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Sunday 2006-09-03 at 10:13 -0400, Rick Friedman wrote:
Yes, the problem seems to be with cron and not the scripts themselves. Cron was running task fine during the night. Suddenly, it seems to not be running any tasks.
Reinstall it... or even better, do a binary compare with the original. The rpm command can do it for you: rpm -v --verify --file /usr/sbin/cron or rpm --verify --all | grep -i cron | less - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFE+zbutTMYHG2NR9URAvPVAJ48j2eu44Yza/2BhIFns/kUshEATQCdHuVp oNAW3ope8q7cAp8LbD0W3LQ= =vZHH -----END PGP SIGNATURE-----
participants (5)
-
Anders Johansson
-
Carlos E. R.
-
Dave Howorth
-
Lívio Cipriano
-
Rick Friedman