Forums

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

Scriptrunner Custom scheduled job response variable

Daniel Garcia October 25, 2021

Custom scheduled jobs in scriptrunner have a bound variable

com.atlassian.scheduler.JobRunnerResponse response

How is this used?

I'm assuming something like this

try {
doTheThing()
response = JobRunnerResponse.success("it was good")

} catch (Exception ex) {
response = JobRunnerResponse.failed("everything was terrible")
}

what value would that provide?

1 answer

1 accepted

0 votes
Answer accepted
PD Sheehan
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.
October 25, 2021

I am not sure if would provide much value in the Scriptrunner context since we get logs and execution details right from the ScriptRunner UI.

But I suspect that variable exists in the binding because they have to generate it to use the built-in scheduler component of Jira.

I think if you added a message to the job, you could view it in /secure/admin/SchedulerAdmin.jspa

This could be useful for other plugins that instantiate the JobRunnerResponse and don't track logs and success like the scriptrunner UI does.

Suggest an answer

Log in or Sign up to answer