Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

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

Configuring a confluence job

robert_egan_305 September 15, 2020

I have a recurring job (implements JobRunner) that I want to parameterize. I have written the job, tested it, and it works (with default parameters). I have also written and tested an Admin screen to collect my parameters. My question is relatively straightforward:

What is the best best way to communicate my parameters to the job?

1 answer

1 accepted

0 votes
Answer accepted
Diego
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 16, 2020

Hello @robert_egan_305 !

As I understand, you are developing a Confluence Plugin and need to pass some variable values to your job.

You can use the interface called JobRunnerRequest to send the values to your JobRunner call. Since the runJob method takes the JobRunnerRequest type as a valid value for the parameter, you can send the necessary info there.

 You can check more information here:

Development is not my specialty, so my help is limited. But, you can surely reach out to our sister community, the Developer Community! You can send your question here:

I hope this helps you!

robert_egan_305 September 17, 2020

I will have to try it, but I believe the correct answer is take the values from the admin screen and update the job's JobConfig using the SchedulerService. Then when the job is run, the JobRunnerRequest will contain the modified JobConfig object with the new data.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
7.0.1
TAGS
AUG Leaders

Atlassian Community Events