Home > Windows Server Tips > > Script reports all the scheduled jobs
Windows Server Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 


Script reports all the scheduled jobs


Mallik Boppe
08.04.2006
Rating: --- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


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:

  1. Ntbackup
  2. Veritas Backups
  3. Discleanup jobs
  4. Robocopy Jobs
  5. SQL backups

Whether a job is a success or failure, a log is generated in the application log or system log.

ELDump is a free tool that reads the contents of the log file. This tool can be effectively used with some scripting to report all the jobs to a particular place. This can make the network administrator's job much easier.

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:

echo off

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.)

cd
(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!

Rate this Tip
To rate tips, you must be a member of SearchWindowsServer.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Server Room Design - Planning, Cooling, Maintenance
HomeTopicsBlogsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2004 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts