I am trying to use schtasks.exe
and create a one-time task that runs on demand. I just want to create the task without a schedule but the command schtasks /create /tn TestTask
fails with Invalid syntax. Mandatory option 'sc' is missing.
. Is there an option i am missing ?
Schtasks – create task with no schedule that runs on demand
scheduled-taskwindows-server-2008
Related Topic
- Windows – How to schedule a task for multiple days of a month using schtasks.exe
- Powershell – pass paramter to Schtasks
- Windows – How to create a scheduled task from the command line that only runs on demand
- Add a new scheduled task from command line with “wake the computer to run this task” on
- How to schedule a server restart from command line on Windows 2012
- Trigger a scheduled task “At task creation/modification” schtasks
- Windows Server 2016 scheduled task schedule must be in future
Best Answer
Create the task and set it to start ONCE in the past. The task will exist and you can run it at will.