Automating maintenance in Windows

The Schedule Service is a Windows facility that schedules programs for delayed future execution and repeated periodic execution. Access to the Schedule Service is limited to the system administrator. By default, Schedule Service jobs run in the background.

Configuration:

at [\\host] time [when] command
AT [\\computername] [ [id] [/DELETE] | /DELETE [/YES]]
AT [\\computername] time [/INTERACTIVE]
[ /EVERY:date [,...] | /NEXT:date [,...]] command
  • host is the name of the computer on which the task is to be scheduled.
  • time specifies the time of day the command is to initiate.
  • command is the command or batch program that is to run.
  • computername specifies a remote computer. Commands are scheduled on the local computer if this parameter is omitted.
  • id is an identification number that is assigned to a scheduled command.
  • DELETE cancels a scheduled command. If id is omitted, then all scheduled commands on the computer are canceled.
  • YES is used to cancel all job commands when no further confirmation is required.
  • INTERACTIVE lets the job interact with the user’s desktop, that is logged on at the time the job runs.
  • EVERY:date[,...] runs the command on each specified days of the week or month.

    If date is omitted, then the current day of the month is assumed.

  • NEXT:date[,...] runs the specified command on the next instance of the day (for example, next Thursday).

    If date is omitted, then the current day of the month is assumed.