How to get the feature of 'End Task'? #943
Answered
by
dahall
achyutghosh
asked this question in
Q&A
-
I can disable the task scheduler using this |
Beta Was this translation helpful? Give feedback.
Answered by
dahall
May 10, 2022
Replies: 1 comment 1 reply
-
To terminate a running task, use: if (task.IsActive && task.State == TaskState.Running)
task.Stop(); |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
achyutghosh
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
task.Enabled = false
will disable the single task immediately.task.Definition.Settings.Enabled = false
is used to disable a task before registration.To terminate a running task, use: