public class JobRunner extends JobExecutor implements Callable<Void>
For more control over the job execution and outcome consider querying the Jobs or using Spring Batch (see the reference documentation for more info).
To make the runner execute at startup, use setRunAtStartup(boolean).
JobExecutor.JobListenerlog| Constructor and Description |
|---|
JobRunner() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
Void |
call() |
void |
setPostAction(Collection<Callable<?>> actions)
Actions to be invoked after running the action.
|
void |
setPreAction(Collection<Callable<?>> actions)
Actions to be invoked before running the action.
|
void |
setRunAtStartup(boolean runAtStartup)
Indicates whether the jobs should be submitted at startup (default) or not.
|
destroy, findJobs, isKillJobsAtShutdown, isVerbose, isWaitForCompletion, setBeanFactory, setExecutor, setJob, setJobNames, setJobs, setKillJobAtShutdown, setVerbose, setWaitForCompletion, startJobs, startJobs, stopJobs, stopJobspublic void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface InitializingBeanafterPropertiesSet in class JobExecutorExceptionpublic void setRunAtStartup(boolean runAtStartup)
runAtStartup - The runAtStartup to set.public void setPreAction(Collection<Callable<?>> actions)
actions - actionspublic void setPostAction(Collection<Callable<?>> actions)
actions - actions