If you are running many scheduled tasks on each server, it may be time consuming to log on to each server to check if a scheduled task has succeeded or failed. These scheduled tasks can be any of a number of operations:
- Veritas Backups
- Discleanup jobs
- Robocopy Jobs
- SQL backups
Whether a job is a success or failure, a log is generated in the application log or system log.
You can write a script (as shown below) for a Veritas Backup exec job and schedule it to run after the Veritas backup job is completed. You should know the timeframe of when the backup exec job will be completed. The same can be done for all the scheduled tasks with some minor changes in the script. This is an effective way of reporting the scheduled jobs in a common place.
Here is the script:
net use \ServerReportc$ /del
(ServerReport is the server where all the scheduled jobs would be reported.)
net use \ServerReportc$ /user:domainnameuseraccount password
(Logging onto the ServerReport server.)
(Changing the path to the location where eldump is copied.)
eldump -l application -A 2 -m "backup exec" > c:BackupExec.log
(Checks all the backup exec logs in the last two hours and dumps it to backupexec.log file.)
FOR /F "tokens=13,14*" %%2 IN (c:backupexec.log)
DO if %%2==Job echo %computername% , %date%, %%2 %%3 %4>>\ ServerReportReport.txt
(Checks if the 13 character in a line is job. If it satisfies the condition then it reports in the reports.txt.)
Please let us know how useful you find this tip by rating it below! If you have a useful
Windows tip, timesaver or workaround to share, submit it to our tip contest and you
could win a prize!
This was first published in August 2006