Set task to run on system startup with cmd/schtasks

user2527738 picture user2527738 · Jul 3, 2013 · Viewed 24.9k times · Source

I am a bit confused on how to schedule a task to run on system startup as SYSTEM with schtasks command line and I have read MS's documentation on schtasks.exe. Can someone here help me.

Answer

Santanu Kumar picture Santanu Kumar · Jul 3, 2013

The following command schedules the MyApp program to run every time the system starts, beginning on March 15, 2001: the date is optional.

schtasks /create /tn "My App" /tr c:\apps\myapp.exe /sc onstart /sd 03/15/2001