Creates new scheduled task.
Name | Specifies a name for the task |
Run | Specifies the program or command that the task runs. |
Args | Arguments of the program that the task runs. |
Type | MINUTE, HOURLY, DAILY, WEEKLY, MONTHLY, ONCE, ONSTART, ONLOGON, ONIDLE. By default, ONCE. |
Mod | Modifier, number, Specifies how often the task runs within its schedule type (defaults to 1). See bellow. |
Day | Specifies a day of the week or a day of a month. Valid only with a WEEKLY or MONTHLY schedule. For WEEKLY type, valid values are MON-SUN and * (every day). MON is the default. A value of MON-SUN is required when the FIRST, SECOND, THIRD, FOURTH, or LAST modifier is used. A value of 1-31 is optional and is valid only with no modifier or a modifier of the 1-12 type. |
Month | Specifies a month of the year. Valid values are JAN - DEC and * The parameter is valid only with a MONTHLY schedule. It is required when the LASTDAY modifier is used. Otherwise, it is optional and the default value is * (every month). |
IdleTime | A whole number from 1 to 999. Specifies how many minutes the computer is idle before the task starts. This parameter is valid only with an ONIDLE schedule, and then it is required. |
Time | Specifies the time of day that the task starts in HH:MM:SS 24-hour format. The default value is the current local time when the command completes. \ Valid with MINUTE, HOURLY, DAILY, WEEKLY, MONTHLY, and ONCE schedules. It is required with a ONCE schedule. |
EndTime | A value that specifies the end time to run the task. The time format is HH:mm (24-hour time). For example, 14:50 specifies 2:50PM. This is not applicable for the following schedule types: ONSTART, ONLOGON, ONIDLE, and ONEVENT. |
Duration | A value that specifies the duration to run the task. The time format is HH:mm (24-hour time). For example, 14:50 specifies 2:50PM. This is not applicable with /ET and for the following schedule types: ONSTART, ONLOGON, ONIDLE, and ONEVENT. For /V1 tasks (Task Scheduler 1.0 tasks), if /RI is specified, then the duration default is one hour. |
StartDate | Specifies the date that the task starts in MM/DD/YYYY format. The default value is the current date. Valid with all schedules, and is required for a ONCE schedule. |
EndDate | Specifies the last date that the task is scheduled to run. This parameter is optional. It is not valid in a ONCE, ONSTART, ONLOGON, or ONIDLE schedule. By default, schedules have no ending date. |
Computer | Specifies the name or IP address of a remote computer (with or without backslashes). The default is the local computer. |
User | Runs the command with the permissions of the specified user account. By default, the command runs with the permissions of the user logged on to the computer running SchTasks. |
Password | Specifies the password of the user account specified in the User parameter (required with it) |
Flags | See bellow. |