• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 29. Automating Routine Tasks > Using the Task Scheduler

Using the Task Scheduler

To save even more time and trouble, you can have Windows run batch files and WSH scripts for you, on a scheduled basis. The Task Scheduler lets you enter commands to be run on an hourly, daily, weekly, or other schedule. You can use scheduling to perform disk cleanups, backups, reports, software installation, or any other task that you want to occur (a) when you're not around, or (b) even if you forget to do it by hand.

NOTE

When a scheduled batch file or script runs, unless you're logged on at the time with the same username as you use to run the scheduled task, you won't see anything on your screen. You won't see any error messages, and you won't be present to type in any information or click on any dialog boxes. So, programs that are to run under the Task Scheduler must be completely debugged, and must require no interaction at all.

To help ensure this, if you are scheduling a Windows Script program, you should explicitly use the cscript command. That is, enter the command as cscript scriptfilename.vbs rather than just the script file name.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint