I have a task that runs periodically against the background of my application. When I run it for the first time, everything is fine, and the task ends perfectly. But the second time and after that, whenever I use task.Start(), it throws an exception:
An unhandled exception of type "System.InvalidOperationException" occurred in the mscorlib.dll file. Additional information: the start cannot be called upon the completed task.
I am sure that my task has been completed to the end. What should I do to run the task periodically?
source
share