Click here to Skip to main content
15,905,427 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello,

I want to enable/disable all the task scheduler using c#.
I have search on google but i don`t get idea.
can any one please give me example for that?
Posted
Updated 14-Feb-19 18:30pm

TaskDefinition td = ts.NewTask();
td.Settings.Enabled = false;//disable
td.Settings.Enabled = true;//enable
 
Share this answer
 
You may stopt/start the task scheduler service, see, for instance, this Stack Overflow question:
"How do I stop/start a scheduled task on a remote computer programatically?"[^].
 
Share this answer
 
Comments
viprat 24-Mar-14 7:58am    
is that any way to do it with c# .net?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900