cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
867
Views
0
Helpful
2
Replies

Running the perl logrot.pl -v

dionjiles
Level 1
Level 1

I pretty much understand the concept of running the perl logrot.pl -v and -c to minimize the syslog.log files. It is any way I can get to run in a batch file or script to run on a certain schedule or does this has to be done manually? Just curious I'm still learning the product.

2 Replies 2

Joe Clarke
Cisco Employee
Cisco Employee

You can schedule it using cron on UNIX or at on Windows.

Once you've verified things work on-demand, you can setup cron on UNIX:

0 1 * * * /opt/CSCOpx/bin/logrot.pl 2>&1 | /usr/lib/sendmail root

or AT on Windows:

at 01:00 /every:M,T,W,Th,F,S,Su C:\progra~1\CSCOpx\bin\perl.exe C:\progra~1\CSCOpx\bin\logrot.pl

(This assumes CiscoWorks is installed in the default location on Windows.)

Those commands will run logrot every day at 1:00 AM. The UNIX cron line will

also send all output of the command to root via email.

Thanks, once again I knew I would find the answer here.