[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [FW-1] Log switching with a Cron Job---Please Help
scripting is best, but you should also remember that cron has minimal environment settings, so it is very possible that the system does not know where to find the date command. why don't you fully qualify the date command and see if your setup is working? Pete -----Original Message----- From: Hal Dorsman [mailto:[email protected]] Sent: Friday, April 05, 2002 9:14 AM To: [email protected] Subject: Re: [FW-1] Log switching with a Cron Job---Please Help Rainer is correct. Don't put the command in the crontab. Write the script, test it manually, then call the script from cron. Hal > -----Original Message----- > From: [email protected] [mailto:[email protected]] > Sent: Friday, April 05, 2002 8:46 AM > To: [email protected] > Subject: Re: [FW-1] Log switching with a Cron Job---Please Help > > > Hello, > > one guess: different shell than cron? > > Solution: Why don't you just write a shell script and simply call the > script via cron? I can send you mine if you can't do it for yourself. > > regards > Rainer > > > -- > Rainer Freis Leiter > Systemadministration > > santix AG Max-Planck-Str. 7 D-85716 Unterschleissheim > Phone: (+49) 89 321506-24 Fax : (+49) 89 321506-99 > > You don't know what real time-critical software is until you're > responsible for the paychecks of a battalion of heavily armed > Marines. (somebody in alt.sysadmin.recovery) > > > > > > "Joseph J. Gallo" <[email protected]> > Sent by: Mailing list for discussion of Firewall-1 > <[email protected]> > 05.04.02 16:00 > Please respond to Mailing list for discussion of Firewall-1 > > > To: [email protected] > cc: > Subject: [FW-1] Log switching with a Cron > Job---Please Help > > > I have the following CRON Job set up to run on FW-1 daily: > > 59 11 * * * /opt/pkg/FW/bin/fw logswitch old.log (This works fine in > switching out the log file) > 05 0 * * * mv /opt/pkg/FW/log/old.log /var/test/logs/`date > +"%m%d%y-%H%M"`.log (This line generates an error file---see below) > " > " > " > " > > When the cron job runs I get the following error message in > my inbox the > next day: > "Syntax error: EOF in backquote substitution" > > If I run the line manually from the console: mv /opt...../old.log > /var.../`date +"%m..."`.log It works fine. > > Am I setting up the cron job incorrectly? Or should I be using a > different way to switch out the logs? > > Thank you in advance for your help. > > Joe > > ================================================= > To set vacation, Out Of Office, or away messages, > send an email to [email protected] > in the BODY of the email add: > set fw-1-mailinglist nomail > ================================================= > To unsubscribe from this mailing list, > please see the instructions at > http://www.checkpoint.com/services/mailing.html > ================================================= > If you have any questions on how to change your > subscription options, email > [email protected] > ================================================= > > ================================================= > To set vacation, Out Of Office, or away messages, > send an email to [email protected] > in the BODY of the email add: > set fw-1-mailinglist nomail > ================================================= > To unsubscribe from this mailing list, > please see the instructions at > http://www.checkpoint.com/services/mailing.html > ================================================= > If you have any questions on how to change your > subscription options, email > [email protected] > ================================================= > ================================================= To set vacation, Out Of Office, or away messages, send an email to [email protected] in the BODY of the email add: set fw-1-mailinglist nomail ================================================= To unsubscribe from this mailing list, please see the instructions at http://www.checkpoint.com/services/mailing.html ================================================= If you have any questions on how to change your subscription options, email [email protected] ================================================= ================================================= To set vacation, Out Of Office, or away messages, send an email to [email protected] in the BODY of the email add: set fw-1-mailinglist nomail ================================================= To unsubscribe from this mailing list, please see the instructions at http://www.checkpoint.com/services/mailing.html ================================================= If you have any questions on how to change your subscription options, email [email protected] =================================================
|