Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

crontab skipping scheduled executions

1 view
Skip to first unread message

Sharkie

unread,
Jul 8, 2008, 12:51:55 PM7/8/08
to
I have a crontab file which is supposed to execute certain script on
regular basis. However quite often it skips that execution. There are
no errors reported, no mail, nothing, the execution just skips. To
test it I added following entry to crontab:

* * * * * date >>/tmp/date.log 2>>/tmp/date_err.log

and here's the output of date.log:

Tue Jul 8 11:30:12 CDT 2008
Tue Jul 8 11:31:08 CDT 2008
Tue Jul 8 11:32:05 CDT 2008
Tue Jul 8 11:34:07 CDT 2008
Tue Jul 8 11:36:05 CDT 2008
Tue Jul 8 11:37:05 CDT 2008

You see that there is no 11:33, nor 11:35.

date_err.log remains blank.

The skips do happen quite frequently and I didn't notice any pattern,
they are skipped on what seems to be random basis. The OS is GNU/Linux
2.6.5-7.

Anyone seen this problem before? The above is just a date printout,
but the real script is expected to run when scheduled, and when it
skips it causes all kind of issues.

Jens Thoms Toerring

unread,
Jul 8, 2008, 3:40:13 PM7/8/08
to
Sharkie <shar...@yahoo.com> wrote:
> I have a crontab file which is supposed to execute certain script on
> regular basis. However quite often it skips that execution. There are
> no errors reported, no mail, nothing, the execution just skips. To
> test it I added following entry to crontab:

> * * * * * date >>/tmp/date.log 2>>/tmp/date_err.log

> and here's the output of date.log:

> Tue Jul 8 11:30:12 CDT 2008
> Tue Jul 8 11:31:08 CDT 2008
> Tue Jul 8 11:32:05 CDT 2008
> Tue Jul 8 11:34:07 CDT 2008
> Tue Jul 8 11:36:05 CDT 2008
> Tue Jul 8 11:37:05 CDT 2008

> You see that there is no 11:33, nor 11:35.

> date_err.log remains blank.

Strange. I just put your example command into my crontab file
and it executes without the slightest glitch, always at hh:mm:01.

I notice that your command isn't executed just after the start
of the minute. Do you have by any chance another command in your
cronfile that also gets executed every minute and perhaps some-
times takes a lot longer than one minute to execute? (The two
minutes you get look a bit as if they could be the timeout for
a connection to a server that sometimes doesn't react...)

Regards, Jens
--
\ Jens Thoms Toerring ___ j...@toerring.de
\__________________________ http://toerring.de

Sharkie

unread,
Jul 9, 2008, 3:52:37 PM7/9/08
to
On Jul 8, 2:40 pm, j...@toerring.de (Jens Thoms Toerring) wrote:
> Strange. I just put your example command into my crontab file
> and it executes without the slightest glitch, always at hh:mm:01.

I showed this to our sys admin, and originally he couldn't see
anything wrong with the cron.
(According to cron logs the cron did execute every minute).
When I showed him my output file, he searched for the timestamp where
the skip occurred,
and hold and behold: there's an issue. "too many files open" error
occurs. Apparently
one (or more) of our apps uses lots of files internally, and the way
OS is configured it cannot
handle this. I was told once the limit is increased the issue should
go away.

0 new messages