Is there a way to check if a scheduled task is running at the moment?

Don Rea asked on September 1, 2021 19:45

I have inherited a Kentico 11 site running on Windows Server 2019. There is a task that takes several hours to run, and sometimes we can't wait for its next scheduled run and have to kick it off by hand. Is there any way to verify that it is running, or do we just have to wait and see if it eventually updates the Last run and Last result fields on the Tasks screen?

Correct Answer

Dmitry Bastron answered on September 3, 2021 09:03

Hi Don,

If you mean check and kill it manually, yes, you can certainly do so. Go to Debug application, select Worker threads among the left tabs, one of the running threads with an eye icon will be your running task. You should be able to kill from the same interface.

0 votesVote for this answer Unmark Correct answer

Recent Answers


David te Kloese answered on September 2, 2021 09:20

Can you alter the code? As the easiest would probably be to alter the task code and create an (event) log entry?

Only other thing I can think of is checking if the "next run" value is in the past meaning the system should have triggered it.

0 votesVote for this answer Mark as a Correct answer

David te Kloese answered on September 3, 2021 09:19

Keep in mind killing it could have unexpected behavior when some action was midway through.

Adding logging would allow you to see if it is actually doing something, not stuck or in a loop (and at what state it is).

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.