Quantcast
Viewing all articles
Browse latest Browse all 12

Windows Task Scheduler

Details on how to schedule a task that runs every N minutes using the Windows Task Scheduler.

Minute Schedule Syntax

schtasks /create /tn /tr /sc minute [/mo {1 - 1439}] [/st ] [/sd ] [/ed ] [{/et | /du } [/k]] [/it] [/ru {[\] [/rp ] | System}] [/s [/u [\] [/p ]]]

Remarks

In a minute schedule, the /sc minute parameter is required. The /mo (modifier) parameter is optional and specifies the number of minutes between each run of the task. The default value for/mo is 1 (every minute). The /et (end time) and /du (duration) parameters are optional and can be used with or without the /k (end task) parameter.

Examples:

To schedule a task that runs every 20 minutes

The following command schedules a security script, Sec.vbs, to run every 20 minutes. The command uses the /sc parameter to specify a minute schedule and the /mo parameter to specify an interval of 20 minutes.
Because the command does not include a starting date or time, the task starts 20 minutes after the command completes, and runs every 20 minutes thereafter whenever the system is running. Notice that the security script source file is located on a remote computer, but that the task is scheduled and executes on the local computer.

schtasks /create /sc minute /mo 20 /tn "Security Script" /tr \\central\data\scripts\sec.vbs

The post Windows Task Scheduler appeared first on Byte Miner.


Viewing all articles
Browse latest Browse all 12

Trending Articles