You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
open class TestJob: Job {
@Authenticated
override fun execute(context: JobExecutionContext) {
log.info("TestJob")
}
companion object {
private val log = LoggerFactory.getLogger(TestJob::class.java)
}
}
add Configuration
@Configuration
open class JobConfig {
@Bean("test_TestJob")
open fun eventConfJob(): JobDetail {
return JobBuilder.newJob()
.ofType(TestJob::class.java)
.storeDurably()
.withIdentity("testJob")
.build()
}
@Bean("test_TestTrigger")
open fun eventConfTrigger(@Qualifier("test_TestJob") jobDetail: JobDetail): Trigger {
val period = 60
log.info("Schedule TestJob using Period of {} seconds", period)
return TriggerBuilder.newTrigger()
.withIdentity("testJob")
.forJob(jobDetail)
.startNow()
.withSchedule(simpleSchedule()
.withIntervalInSeconds(period)
.repeatForever())
.build()
}
companion object {
private val log = LoggerFactory.getLogger(JobConfig::class.java)
}
}
5.Start application. Console shows that job is active and running. Jobs are in NORMAL state in JobModelBrowse
6. Stop application, Add property spring.quartz.auto-startup=false and start again
ER: Jobs should be in PAUSED state in JobModelBrowse
AR: Jobs are in NORMAL state, but they do not run. Try to Pause job and Execute Now/Resume -> they do not run
The text was updated successfully, but these errors were encountered:
Forum question
5.Start application. Console shows that job is active and running. Jobs are in
NORMAL
state inJobModelBrowse
6. Stop application, Add property
spring.quartz.auto-startup=false
and start againER: Jobs should be in
PAUSED
state inJobModelBrowse
AR: Jobs are in
NORMAL
state, but they do not run. Try toPause
job andExecute Now/Resume
-> they do not runThe text was updated successfully, but these errors were encountered: