Skip to content

How to get the feature of 'End Task'? #943

Answered by dahall
achyutghosh asked this question in Q&A
Discussion options

You must be logged in to vote

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:

if (task.IsActive && task.State == TaskState.Running)
   task.Stop();

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@achyutghosh
Comment options

Answer selected by achyutghosh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants