@PublicSpi
public interface JobRunner
SchedulerService when it is time for a scheduled job to run.
Application code should register the JobRunner on startup, and need do nothing on shutdown.
Plugins should register the JobRunner implementation at startup/plugin enabled, and
unregister the JobRunner
when the plugin is disabled.
| Modifier and Type | Method and Description |
|---|---|
JobRunnerResponse |
runJob(JobRunnerRequest request)
Called by the
SchedulerService when it is time for a job to run. |
@Nullable JobRunnerResponse runJob(JobRunnerRequest request)
SchedulerService when it is time for a job to run.
The job is expected to perform its own error handling by catching exceptions
as appropriate and reporting an informative message using
JobRunnerResponse.failed(String).request - the information about the request that was supplied by the scheduler serviceJobRunnerResponse providing additional detail about the result of running the job.
The response is permitted to be null, which is treated as identical to
JobRunnerResponse.success().Copyright © 2017 Atlassian. All rights reserved.