Try our conversational search powered by Generative AI!

CMS 12: scheduled job stop issue after restart

Vote:
 

If you restart the server while you run a job in Optimizely, the job will remain in running state for ever and it won't stop or finish or start anymore.

the only solution to fix this issue is to find your job in tblScheduledItem table and set IsRunning to false.

#279685
Edited, May 03, 2022 11:47
Vote:
 

Looks like there was a fix for this issue released in EPiServer.CMS.Core 12.5.1: https://world.optimizely.com/support/bug-list/bug/CMS-22374

#279760
May 03, 2022 21:46
Vote:
 

Pretty sure the problem have reoccured if the old release ever fixed it, running 12.9.2 and the jobs still gets stuck if you end the session before they're done.

#291698
Nov 15, 2022 8:23
Vote:
 

Can you stop it with "Stop" button in job details page?

#291787
Nov 16, 2022 19:09
Perly Iveo - Nov 17, 2022 9:10
No, had to go through the database the same way as Mahdi did
Vote:
 

I'm using EpiServer.CMS.Core 12.13.1, when click Stop in UI, the job still running, keep writing log, this fix https://world.optimizely.com/support/bug-list/bug/CMS-22374 not actual work, just allow you to restart the job.

#303173
Jun 08, 2023 10:08
Vote:
 

We are encountering the same on EpiServer.CMS.Core 12.14

#303252
Jun 09, 2023 11:24
Vote:
 

Hi,

I am trying to understand the issue, I am assuming we are in a DXP environment using app services rather than a physical server. I also presume that you have implemented scheduled job 'stop' correctly (you'd be surprised).

If that is the case then yes, more than likely this will occur as the context / instance the job was running in is lost.

You can ask Optimizely to decicate an instance for you to handle scheduled jobs, therefore if you do need to restart the app service, this should not impact the instance running the scheduled jobs (or at least I hope that is what Optimizely has configured it to do).

I think though there is something I am missing around why you need to restart the app service? Generally restarting an app service should be considered carefully.

Paul

#303378
Jun 12, 2023 10:29
Vote:
 

It should be fixed with 12.9. bug CMS-24019

@Benjamin - could you press Stop? 

#303389
Jun 12, 2023 13:12
Dzung Nguyen - Jun 12, 2023 13:17
This issues still occurs on 12.13.1, I changed Stoppable for all scheduled job to True value but it still running after web app restarted.
Benjamin Dean - Jun 12, 2023 13:27
Yes i could click stop and it stopped, there was then nothing in the history for the run but it was hard to know the job crashed and wasent active
Quan Mai - Jun 12, 2023 13:40
@Dzung Nguyen not sure I follow. When you stop it, the fix with CMS-24019 will basically set the running state to false. unless your job is "restartable"
Quan Mai - Jun 12, 2023 13:40
@Benjamin - good point. I will raise it as a suggestion to Content team
Dzung Nguyen - Jun 12, 2023 14:00
@Quan Mai, while the job is running, I stopped the web app, then restart web app, I think the job should be stopped here but seem it keep running state. While the job status not show anything before 12.14, I can't known exactly the job running or not, very weird UX
Quan Mai - Jun 12, 2023 14:17
We are talking about different things. If you stop THE JOB after the web app restarts, then the job should be not running. that was the fix. the UX is not the best, that I can agree and already submitted a bug to the team.
Dzung Nguyen - Jun 12, 2023 14:24
Okie thank you. I have other question and hope that you can answer in this thread, can I stop all jobs from app startup? , if I can, how to do that?.
Quan Mai - Jun 13, 2023 5:32
You can use IScheduledJobRepository to get all jobs, then IScheduledJobExecutor.Cancel to stop each of them. Of course you can check if each is running or not before stopping
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.