Re: Changing cron from a script?

From: Lieberg, Patrick (plieberg@EV3.NET)
Date: Mon Feb 02 2004 - 13:59:53 EST


I love the flag idea. Its easy to implement and doesn't involve messing with my production crontab file.
 
Thanks.
 
-Patrick Lieberg
Systems Engineer
ev3 Inc.

-----Original Message-----
From: IBM AIX Discussion List [mailto:aix-l@Princeton.EDU]On Behalf Of Holger.VanKoll@SWISSCOM.COM
Sent: Monday, February 02, 2004 12:49 PM
To: aix-l@Princeton.EDU
Subject: Re: Changing cron from a script?

something like
 
crontab -l >/tmp/oldcron
cat /tmp/oldcron | do modifications >/tmp/newcron
crontab newcron
 
should work
 
 
for you problem it would be easier if you backup-scripts set some flag; f.e. touch /tmp/backuprunning
then your crontab-scripts could check this flag and exit if it exists -> no crontab modification necessary
 

-----Original Message-----
From: Lieberg, Patrick [mailto:plieberg@EV3.NET]
Sent: Monday, February 02, 2004 6:55 PM
To: aix-l@Princeton.EDU
Subject: Changing cron from a script?

This seems like it should be simple, but my brain isn't able to wrap itself around the problem this morning. Perhaps its all the snow.
 
My weekly backup stops our production databases and I'd like to comment out some cron jobs so they don't generate a bunch of errors while the backup is running, then uncomment them when the backup completes. Anyone have a good ksh syntax for how to edit a crontab file from a ksh script?
 
-Patrick Lieberg
Systems Engineer
ev3 Inc.

_____________________________________________________________________
This message has been checked for all known viruses

_____________________________________________________________________
Message scanned for viruses

_____________________________________________________________________
This message has been checked for all known viruses



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:17:34 EDT