Announcement

Collapse
No announcement yet.

Instantly end task which is currently running by windows task scheduler.

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Instantly end task which is currently running by windows task scheduler.


    You can end task from windows task scheduler using below script,(here 'hibes' is the running task's name from windows task scheduler )


    import subprocess;
    process= subprocess.Popen(['SchTasks','/End','/TN','hibes'],shell=True,stdout=subprocess.PIPE);
    result=process.communicate()[0]
    print result;



    sample output would be,

    SUCCESS: The scheduled task "hibes" has been terminated successfully.
Working...
X