Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: cron time is not same as system time

From: Douglas A. Tutty <dtutty(at)porchlight.ca>
Date: Wed Aug 22 2007 - 09:06:38 EDT


On Wed, Aug 22, 2007 at 10:08:52AM +0100, Chris Buckley wrote:
>
> A very strange problem has cropped up on our Debian GNU/Linux 3.1 box
> this morning.
>
> We have a crontab for a user scheduled to run at:
>
> 45 4 * * * /path/to/utils/script-executed.pl
> 2>/path/to/logs/stdout-foobar.log
>
> The cron.log shows this file running at "04:45".
 

> HOWEVER, the cron does not actually run until 09:45.
> I have witnessed this first hand this morning, tailing the cron.log and
> seeing at 09:45 the process run, but the time being recorded as 04:45.
>
> I can't immediately see a problem.
>
> cbuckley@hermes:/var/log$ tzconfig
> Your current time zone is set to Europe/London
>
> The box is one which, unfortunately, I do not have root rights on - we
> outsource a lot of our servers. What checks would I need to perform
> (given my limited user rights) to assess and help diagnose what the
> problem is?

Is the system clock set to UTC?
$ cat /etc/default/rcS

You should see a line
UTC=yes.

I don't know if this matters, and with a tz of London it shouldn't account for 5 hrs.

Is 09:45 the time the process starts or the time it completes and mails output? Perhaps add a line to the script that prints the date at the beginning and the end, e.g.

echo "Script starting"
date
...
echo "Script ending"
date

Then check the headers on the email message.

Do you need help?X

Doug.

-- 
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Received on Wed Aug 22 09:07:32 2007

This archive was generated by hypermail 2.1.8 : Sun Oct 07 2007 - 02:40:36 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library