Subject: Re: cron not working
From: Rajashekar Chintalapati <[email-masked]>
To: "Pierre A. Humblet" <[email-masked]>
Cc: [email-masked]
Date: Mon, 29 Mar 2010 11:29:31 -0700
List-Id: <cygwin.cygwin.com>

Thanks for letting me know the problem.
It worked after giving some time.

Rajashekar.

On Sun, Mar 28, 2010 at 5:44 PM, Pierre A. Humblet
<[email-masked]> wrote:
> At 06:22 PM 3/28/2010, Rajashekar Chintalapati wrote:
>>
>> Hi,
>>  I am trying to run a simple script using crontab.
>>
>> $ more /cygdrive/c/list
>> ls -ltr /cygdrive/c/ > /tmp/li.txt
>>
>> $ crontab -l
>> # DO NOT EDIT THIS FILE - edit the master and reinstall.
>> # (/tmp/crontab.ry22Lho7uW installed on Sun Mar 28 14:03:55 2010)
>> # (Cron version V5.0 -- $Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie
>> Exp $)
>> 4 14 * * * /cygdrive/c/list
>>
>>
>
> <snip>
>
>
>> Please find attachment - cronbug.txt
>> It once run correctly, i am able to see in logs too.
>> 2010/03/28 01:00:01 [SYSTEM] /usr/sbin/cron: PID 4060: (Administrator)
>> RELOAD (tabs/Administrator)
>> 2010/03/28 01:01:01 [SYSTEM] /usr/sbin/cron: PID 4068: (Administrator)
>> CMD (/cygdrive/c/list > /tmp/error.log 2>&1)
>>
>>
>> But after that not sure what went wrong, if i change the time, cron is
>> not executing the /cygdrive/c/list.
>>
>> Can you please let us know what may be the problem.
>
> The problem is that you set the time in the crontab "just right" so that you
> hope
> cron will execute it at the next minute.
> # (Cron version V5.0 -- $Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp
> $)
> 4 14 * * * /cygdrive/c/list
>
> Unfortunately for you, cron procrastinates. At the next minute cron reloads
> the
> crontab, but it only executes the commands at the following minute.
>
> 2010/03/28 01:00:01 [SYSTEM] /usr/sbin/cron: PID 4060: (Administrator)
> RELOAD (tabs/Administrator)
> 2010/03/28 01:01:01 [SYSTEM] /usr/sbin/cron: PID 4068: (Administrator) CMD
> (/cygdrive/c/list > /tmp/error.log 2>&1)
>
> 2010/03/28 14:04:01 [SYSTEM] /usr/sbin/cron: PID 4060: (Administrator)
> RELOAD (tabs/Administrator)
> 2010/03/28 14:04:31 [Administrator] crontab: PID 1040: (Administrator) LIST
> (Administrator)
>
> The first time you gave cron the extra minute it needed. The second time you
> didn't.
>
> Pierre
>
>
>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple