Disable scheduled tasks using comand line

  • Thread starter Thread starter Mario Alvares
  • Start date Start date
M

Mario Alvares

Hello,

I am using Windows XP Pro SP2.

I need to enable/disable a scheduled task from the command line.
I checked the documentation for 'schtasks.exe' (command line version of
Scheduled Tasks) on this page :
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/
en-us/schtasks.mspx

But the '/change' option which allows you to change the properties of a
task, does not have a parameter to enable or disable a task.

It seems the version of schtasks.exe that ships with Windows Server 2003
has a "/change (/ENABLE|DISABLE)" option according to this documentation:
http://technet2.microsoft.com/windowsserver/en/library//1d284efa-9d11-
46c2-a8ef-87b297c68d171033.mspx

But this option does not seem to work in XP Pro, and the docs for XP Pro
don't make any mention of this option too.

So, does anyone know how to enable/disable a scheduled tasks from the
command-line in Win XP Pro ?

Any help would be appreciated.

Thanks,
Mario
 
To Disble the Schedular job
Rename .job in to .bak
move "C:WINDOWS\Tasks\TEST TASK.job" "C:WINDOWS\Tasks\TEST TASK.bak"

To Enable the Schedular job
Rename .bak in to .job
move "C:WINDOWS\Tasks\TEST TASK.bak" "C:\WINDOWS\Tasks\TEST TASK.job"
 
Back
Top