X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SARE_MSGID_LONG40 X-Spam-Check-By: sourceware.org MIME-Version: 1.0 In-Reply-To: <0L0000C1FQ1XMVN1@vms173007.mailsrvcs.net> References: <676bcee21003281522m30d183c3m824e36f6ff6037b3 AT mail DOT gmail DOT com> <0L0000C1FQ1XMVN1 AT vms173007 DOT mailsrvcs DOT net> Date: Mon, 29 Mar 2010 11:29:31 -0700 Received: by 10.216.93.68 with SMTP id k46mr389526wef.104.1269887371705; Mon, 29 Mar 2010 11:29:31 -0700 (PDT) Message-ID: <676bcee21003291129xc65eb5au5552f2f8950db2a8@mail.gmail.com> Subject: Re: cron not working From: Rajashekar Chintalapati To: "Pierre A. Humblet" Cc: cygwin AT cygwin DOT com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT 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 wrote: > At 06:22 PM 3/28/2010, Rajashekar Chintalapati wrote: >> >> Hi, >> =A0I 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 >> >> > > > > >> 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 E= xp > $) > 4 14 * * * /cygdrive/c/list > > Unfortunately for you, cron procrastinates. At the next minute cron reloa= ds > 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) LI= ST > (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