From: Holger.VanKoll@SWISSCOM.COM
Date: Mon Feb 02 2004 - 13:48:31 EST
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
This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:17:34 EDT