delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/04/15/10:24:47

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Tue, 15 Apr 2003 10:24:36 -0400 (EDT)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: BB <canofspam AT att DOT net>
cc: cygwin AT cygwin DOT com
Subject: Re: cron on Win9x works
In-Reply-To: <b7h4ao$23f$1@main.gmane.org>
Message-ID: <Pine.GSO.4.44.0304151022440.26381-100000@slinky.cs.nyu.edu>
Importance: Normal
MIME-Version: 1.0

Reply inline below:

On Tue, 15 Apr 2003, BB wrote:

> "Luciano" <lucianoav AT gmx DOT net> wrote in message
> news:Xns935AE4A876607lucianoavgmxnet AT 80 DOT 91 DOT 224 DOT 249...
> > I read it again, but I am not sure I understand it. The hack proposed
> > by BB him/herself
>
> him
>
> > rm -R -f /var/cron/tabs.sav
> > cp -R /var/cron/tabs /var/cron/tabs.sav
> > rm -R -f /var/cron/tabs
> > mv /var/cron/tabs.sav /var/cron/tabs

BTW, is there a particular reason why you can't do it in 3 steps:
  rm -Rf /var/cron/tabs.sav
  mv /var/cron/tabs /var/cron/tabs.sav
  cp -R /var/cron/tabs.sav /var/cron/tabs
?
	Igor

> cron compares the timestamp of it's 'old' database of tasks to the timestamp
> of the /var/corn/tabs directory.  Assuming the all 4 steps (rm, cp, rm, mv)
> worked, the newly created /var/cron/tabs should have a new timestamp.  Make
> sure it is getting changed to a new time.
>
> If a directory already exists when a mv is done to it, the directory will
> not get a new timestamp.  For instance, if for some reason the third step
> removing the /var/cron/tabs directory fails, the last step mv will not
> update the timestamp.
>
> I would think that this kludge should not be a long term solution.  A change
> to cron should fix this problem.
>
> Also, beware that if you are doing the 4 steps and the tabs directory does
> not exist when cron checks for it, cron will terminate.
>
> BB
>
> > doesn't work here. Cron still skips tasks. I also tried touch'ing the
> > tab file, but it didn't work either. Elusive.
> >
> > Luciano ES
> > Santos, SP - Brasil
> >
> > ********************************
> > Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu> wrote in
> > news:Pine DOT GSO DOT 4 DOT 44 DOT 0304112049570 DOT 26381-100000 AT slinky DOT cs DOT nyu DOT edu:
> >
> > > Please reread the message.  Cron doesn't detect changes to
> > > /var/cron/tabs, so you have to make sure the timestamp changes
> > > before cron will run new commands.
> > >      Igor

-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Knowledge is an unending adventure at the edge of uncertainty.
  -- Leto II


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019