12

Is there a command-line tool that can be used to programatically list, add, edit and delete Windows Scheduled tasks?

I realize that there are better alternatives to Scheduled Tasks, but I need to make changes to an existing set of tasks on a large number of PCs and would like to script it.

Thanks, Jon

Jon
  • 509
  • 2
  • 5
  • 8

2 Answers2

16

See This link at Microsoft on using at and schtasks to manage scheduled tasks from the command line.

Marko Carter
  • 4,092
  • 1
  • 30
  • 38
  • [at](https://ss64.com/nt/at.html) vs [schtasks](https://ss64.com/nt/schtasks.html): https://blogs.technet.microsoft.com/heyscriptingguy/2004/09/22/how-can-i-manage-scheduled-tasks-using-scripts/ – Vadzim Nov 17 '17 at 12:00
  • Quote: **Schtasks replaces At.exe**, a tool included in previous versions of Windows. Although At.exe is still included in the Windows Server 2003 family, schtasks is the recommended command-line task scheduling tool. Link: https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/schtasks – Wayne Phipps Apr 01 '19 at 09:46
3
schtasks.exe /change /TN pepe /ENABLE
user9517
  • 115,471
  • 20
  • 215
  • 297
Martin
  • 31
  • 1