Schtasks create part-2 in Window Server 2008

In this article I am going to explain about Schtasks create command in Windows Server 2008 operating system and also explain it's related syntax.
  • 1992

schtasks create command part-2 in window server 2008

  • The schtasks create command is a command-line tool of Windows Server 2008.

  • The schtasks create command is available on computers running Windows Server 2008.

  • The schtasks create command is used to different parameter combinations for each schedule type.

some are following options of schtasks create

To Schedule a task that runs once

Syntax

schtasks /create /tn <TaskName> /tr <TaskRun> /sc once /st <HH:MM> [/sd <StartDate>] [/it] [/ru {[<Domain>\]<User> [/rp <Password>] | System}] [/s <Computer> [/u [<Domain>\]<User> [/p <Password>]]]

To schedule a task that runs every time the system starts

Syntax

schtasks /create /tn <TaskName> /tr <TaskRun> /sc onstart [/sd <StartDate>] [/it] [/ru {[<Domain>\]<User> [/rp <Password>] | System}] [/s <Computer> [/u [<Domain>\]<User> [/p <Password>]]]

To Schedule a task that runs when a user logs on

Syntax

schtasks /create /tn <TaskName> /tr <TaskRun> /sc onlogon [/sd <StartDate>] [/it] [/ru {[<Domain>\]<User> [/rp <Password>] | System}] [/s <Computer> [/u [<Domain>\]<User> [/p <Password>]]]

To Schedule a task that runs when the system is idle

Syntax

schtasks /create /tn <TaskName> /tr <TaskRun> /sc onidle /i {1 - 999} [/sd <StartDate>] [/it] [/ru {[<Domain>\]<User> [/rp <Password>] | System}] [/s <Computer> [/u [<Domain>\]<User> [/p <Password>]]]

To Schedule a task that runs now

Syntax

schtasks /create /tn <TaskName> /tr <TaskRun> /sc once [/st <HH:MM>] /sd <MM/DD/YYYY> [/it] [/ru {[<Domain>\]<User> [/rp <Password>] | System}] [/s <Computer> [/u [<Domain>\]<User> [/p <Password>]]]

To Schedule a task that runs with different permissions

Syntax

schtasks /create /tn "My App" /tr myapp.exe /sc weekly /d TUE /ru Admin06

To Schedule a task that runs with system permission

Syntax

schtasks /create /tn "My App" /tr c:\apps\myapp.exe /sc monthly /d 15 /ru System

To Schedule a task that runs more than one program

Syntax

schtasks /create /tn Monitor /tr C:\MyApps.bat /sc onlogon /ru Reskit\Administrator

To Schedule a task that runs on a remote computer

Syntax

schtasks /create /s SRV01 /tn "My App" /tr "c:\program files\corpapps\myapp.exe" /sc daily /mo 10

Ask Your Question 

Got a programming related question? You may want to post your question here 

Categories

More Articles

© 2019 DotNetHeaven. All rights reserved.