Mailinglist Archive: opensuse (3506 mails)
| < Previous | Next > |
Re: [SLE] Cron Not Running Tasks
- From: Rick Friedman <rickfriedman@xxxxxxxxxxx>
- Date: Sun, 3 Sep 2006 14:13:50 +0000 (UTC)
- Message-id: <1157292806.6160.13.camel@chisum>
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
> 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
| < Previous | Next > |