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
Peter-Dave Sheehan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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