If someone manually updated crontab or some other scripts updated crontab 
between 
"Editing the file" and “last step installing new crontab”,
the crontab will be overwritten, something will definately lost. This is a race 
condition.
However this will also happen when two guys manually editing crontab(crontab 
-e) at same time.
 
thanks.
ping
----- Original Message ----- 
From:Matt Richards
To:help-cfengine
Sent: Friday, March 05, 2010 12:12 AM
Subject: Re: editing old school cron tables


This sound like the best safe method. A little more work to deal with the file, 
but no race conditions or quirky platform specific items. 


On Mar 4, 2010, at 11:00 AM, Christopher Browne wrote:

I cope with cron edits via...

- Pulling it out into a file (crontab -l)

- Editing the file

- If the file changed, archiving the old copy somewhere (so I've got
 at least loose "version control" as to what changed when)

- crontab < $file




_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine
_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to