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

Chapter SUNDAY EVENING. Using JScript to... > Automating Script Execution

Automating Script Execution

Depending on what you design your JScripts to do, you might want to run them at times when you are not working on your computer. For example, you might want to write a JScript that runs the Windows defrag.exe command-line utility. This command-line utility provides the capability to run the Windows Disk Defragmenter utility, which defrags files that are stored on hard disk drives.

The unfortunate thing about working the defrag.exe is that it is very resource intensive and makes working on your computer almost impossible while it is running. Therefore, most people generally start the defrag process at times when they know that they will not be using their computers. Another way to tackle this situation is to create a JScript that runs defrag.exe and then to schedule the execution of this script so that it runs during the middle of the night. For example, the following two-line JScript demonstrates how this script might look:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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