Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

schedule job is unregistered when cluser's node is offline

tci00295
August 5, 2021

A plugin for Jira software which I developed has a scheduled job. Now I'm testing it in jira software data center with two nodes.

When I shut down one node, I found sometimes my job's destroy method will be run.

So the job will be removed and never works until I restart the node again.

But this happens sometimes, not all of the time.

I don't know the lifecycle when a node removed. And how to solve it.

public void destroy() throws Exception { 

this.eventPublisher.unregister(this);

this.schedulerService.unscheduleJob(JobId.of(JOB_ID));

this.schedulerService.unregisterJobRunner(JOB_RUNNER_KEY);

}

 

0 answers

Suggest an answer

Log in or Sign up to answer