Is it possible to stop a Confluence scheduled Job in some way?
It doesn't matter if this is possible through the administration console, calling any REST services or doing it programmatically by the job itself.
We have the problem, that for whatever reason sometimes one iteration of the scheduled job is still running (for days) and new ones won't start before the older job hasn't finished. Restarting the server is not everytime the best solution since it is a production server. It would be also fine, when the job stops itself, when it finds out that it running too long.
I appreciate any meaningful idea.
Thanks!
Community moderators have prevented the ability to post new answers.
I don't think you can, without stopping Confluence itself.
My instinct is to agree with this. I'm not 100% sure, which is why I didn't say it earlier, but I do suspect there's no way to stop the jobs. Which means you need to fix them so they work, or turn them off and do whatever it is they're supposed to do in a performant way.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm sorry, that I could not answer earlier, but for whatever reason I can only post one comment a day here.
As I said yesterday, on my local developer instance and also on our test machine it works perfectly, it generates the desired content without problems - day for day. Normally this works also on our production server, but we see from time to time that some job instance hangs (as I can remember, the last failing time was two or three months ago). We can only see in the log file that the new job iteration could not be started, since an older one hasn't finished yet.
Is there e.g. no chance to get a reference to the surrounding quartz job object and to stop it so within the job instance?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not without coding something to do it. You'd be better off debugging the failures in the jobs.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think it might be better to explain why you've got jobs that run for days - that sounds very broken to me. Surely if they're doing something useful, you don't want to kill them anyway?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We don't know why sometimes jobs run for a long time. They are doing anything, since the output files, which they should generate, don't change. On our test server everything is fine, we had never such problems as on the production one. Maybe the problem could be the workload, which is much heavier on the productive server - so jobs may get stale.
By the way, we are running Confluence 5.7.3 (if this information is important)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So, what are these jobs doing? If they're failing this badly, you can't be getting useful output from them, so I'd suggest turning them off while you look at rebuilding them in a way that works.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.