LocalSch.exe command-line parameters
In additional to monitoring and running local tasks, LocalSch.exe can be used to install or remove the service, add new tasks, and list all of the currently configured tasks.
The following are the command line options supported by the local scheduler application.
LocalSch.exe [/i] [/r] [/d] [/tasks] [/isinstalled] [/del] [/removetasks]
[/exe=<executable>] [/cmd=<command line>] [/start=”<date/time>”] [/freq=xxx]
[/user] [/bw=xxx|<server>] [/tod=<begin>|<end>] [/dow=<begin>|<end>]
[/dom=<begin>|<end>] [/ipaddr] [/taskid=<id>] [/range=<min>|<max>]
/i – Install service
Installs the local scheduler service on the device. After being installed the local scheduler will still need to be started.
/r – Remove service
Removes the local scheduler service from the device. The local scheduler service should be stopped before you remove it.
/d – Run in debug mode
Runs the local scheduler in a debug mode. When run in debug mode, the local scheduler runs as a normal Windows process rather than as a service or pseudo service. This mode does not result in any additional debug output.
/isinstalled – Is installed check
Checks to see if the local scheduler service is installed on the local computer. This method will return S_OK, or zero, if the local scheduler is installed. If the local scheduler is not installed a non-zero value will be returned.
/tasks – List tasks
This command will output the currently configured tasks to stdout but can only be seen in a command prompt if piped to more.
LocalSch.exe /tasks | more
The output can be redirected to a text file, tasks.txt for example, using the following command line:
LocalSch.exe /tasks > tasks.txt