Adding a task with LocalSch.exe
The rest of the command-line parameters are used for adding a local task. When adding a local task, you must specify the executable using the /exe parameter. If the user or process executing the command line doesn't have administrator rights, the task won't be scheduled. If the current user doesn't have administrator privileges, the task won't be created.
In addition to the command line options outlined below, the /taskid option may be used to specify the task.
/exe=<executable> - Scheduled application
Specifies the application that is to be launched when the scheduled time arrives. If this parameter isn't provided, the local task won't be created.
/cmd=<command line> - Application command line
Specifies the command line to be used when the scheduled application is launched. If this parameter is not specified, the scheduled application will be launched without command line parameters.
/start="<date/time>" – Start time
Specifies the start time for the application. If this parameter isn't specified, the application will be launched as soon as possible. If any filters are specified they must be satisfied before the application is launched. The start time is specified is in local system time of the computer and has the following format:
/start="06 Nov 2001 17:39:47" /bw=WAN|myserver.domain.com
This format is a shortened version of the format used by HTTP. The month is always specified using a three-letter ASCII abbreviation: Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, or Dec. If the format of the date is specified incorrectly, the task won't be added.
/freq=xxx – Frequency
Specifies a periodic frequency. Frequency is the number of seconds before the task will be run again. If this parameter isn't specified or is zero, the task will only be run once.
/user – User filter
Specifies that a user filter should be created for the task. A user filter will prevent the task from being run until a user is logged onto the system.
/bw=xxx|<network host> - Bandwidth filter
Specifies the bandwidth needed to a specific network host. The bandwidth can be specified as LAN, WAN, or RAS. If another bandwidth value is used the local scheduler will default to RAS bandwidth. The task won't be run until the local scheduler detects that the specified type of bandwidth is available between the device and the specified network host.
For example, the following filter would specify not running the task until at least WAN connectivity is available to the myserver.domain.com computer.
/bw=WAN|myserver.domain.com
/tod=<begin>|<end> - Time of day filter
Specifies a time of day filter. The task won't be run unless the time of day is between the specified begin and end hours. Time of day values are specified as the hour 0 through 23. For example, the following filter would specify running a task between 7 p.m. and 10 p.m.
/tod=19|22
/dow=<begin>|<end> - Day of the week filter
Specifies a day of the week filter. The task won't be run unless the weekday is between the specified begin and end days. Day of week values are specified as an integer with 0 being Sunday. For example, the following filter would specify running a task between Sunday and Thursday.
/dow=0|4
/dom=<begin>|<end> - Day of month filter
Specifies a day of the month filter. The task won't be run unless the day of the month is between the specified begin and end days. The day of month filter is specified using numeric value between 1 and 31. For example, the following filter would specify running the task between the 16th and 28th of the month.
/dom=16|28
/ipaddr - IP address change filter
Specifies that the task should be run whenever the IP address of the machine changes.