Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to stop a Confluence Scheduled Job?

Özgür Demirci May 26, 2015

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!

3 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Midori
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 26, 2015

I don't think you can, without stopping Confluence itself.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 26, 2015

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.

0 votes
Özgür Demirci May 26, 2015

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?

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 26, 2015

Not without coding something to do it. You'd be better off debugging the failures in the jobs.

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 26, 2015

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?

Özgür Demirci May 26, 2015

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)

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 26, 2015

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.

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events