Knowledge Base

How to run a WSH file from NT Scheduler

Article ID: 191430

Article Last Modified on 8/8/2007


APPLIES TO


This article was previously published under Q191430

SUMMARY

A script using Windows Script Host 1.0 can be executed on a scheduled basis from Windows NT's scheduler. This is useful for system administrators to run unattended tasks.

MORE INFORMATION

The Windows NT AT command invokes the scheduler.

Here is an example of the command to execute a WSH script at 16:00:

   AT 16:00:00 /interactive "c:\winnt\samples\wsh\excel.vbs"
				


   The winnt\samples\wsh directory is installed with WSH.
				


Try the preceding statement with a time that is ahead of the current time by a minute or so to make sure it accepts it.

Caveats

  • The "/interactive" switch needs to be applied to the AT command if there is any desired user interactivity.
  • The full path to the .vbs or .js file needs to be included in the AT command.
  • It doesn't work when using wscript or cscript in the AT command.

REFERENCES

For more information about Windows Script Host, see the following Web site:

Additional query words: kbWSH

Keywords: kbhowto kbscript KB191430