Add the given {@link org.quartz.JobDetail} to the Scheduler, and associate the given {@link Trigger} with it.
{@link org.quartz.JobDetail}
{@link Trigger}
If the given Trigger does not reference any Job, then it will be set to reference the Job passed with it into this method.
Job
260261262263264265266267268269270
JobContext jobctx = new BehaviorJobContext( nodeId, workingMemory, stw, memory, context ); JobHandle handle = clock.scheduleJob( job, jobctx, new PointInTimeTrigger( nextTimestamp, null, null ) ); jobctx.setJobHandle( handle ); } }
312313314315316317318319320321322
long nextTimestamp = Math.max( clock.getCurrentTime(), ((EventFactHandle) factHandle).getEndTimestamp() + this.expirationOffset ); JobContext jobctx = new ExpireJobContext( expire, workingMemory ); JobHandle handle = clock.scheduleJob( job, jobctx, new PointInTimeTrigger( nextTimestamp, null, null ) ); jobctx.setJobHandle( handle );
732733734735736737738739740741742
TimerService clock = inCtx.wm.getTimerService(); JobContext jobctx = new ExpireJobContext( new WorkingMemoryReteExpireAction( factHandle, otn ), inCtx.wm ); JobHandle handle = clock.scheduleJob( job, jobctx, new PointInTimeTrigger( nextTimeStamp, null, null ) ); jobctx.setJobHandle( handle );
753754755756757758759760761762763
TimerService clock = inCtx.wm.getTimerService(); JobContext jobctx = new ExpireJobContext( new WorkingMemoryReteExpireAction(factHandle, otn), inCtx.wm ); JobHandle handle = clock.scheduleJob( job, jobctx, new PointInTimeTrigger( _expire.getNextFireTimestamp(), null, null ) ); jobctx.setJobHandle( handle );
197198199200201202203204205206207
if ( rightTuple != null ) { long nextTimestamp = ((EventFactHandle) rightTuple.getFactHandle()).getStartTimestamp() + this.size; JobContext jobctx = new BehaviorJobContext( workingMemory, this, context ); JobHandle handle = clock.scheduleJob( job, jobctx, new PointInTimeTrigger( nextTimestamp, null, null ) ); jobctx.setJobHandle( handle ); } }
190191192193194195196197198199200
long nextTimestamp = ((EventFactHandle) rightTuple.getFactHandle()).getStartTimestamp() + this.size; JobContext jobctx = new BehaviorJobContext( workingMemory, this, context ); BehaviorJob job = new BehaviorJob(); JobHandle handle = clock.scheduleJob( job, jobctx, new PointInTimeTrigger( nextTimestamp ) ); jobctx.setJobHandle( handle ); } }
5960616263646566676869
Long evictionWakeUpTime = contextTemp.getEvictionWakeUpTime(); timer.scheduleJob(new EvictionJob(contextTemp), new MockJobContext(), new MockTrigger(new Date(), evictionWakeUpTime)); //Set the timestamp for the first time contextTemp.set("myvalue", "value"); Thread.sleep(1000);
116117118119120121122123124125126
trigger.setGroup(LOG_DISPLAYER_GROUP); trigger.setCronExpression("* * * * * ?"); // Schedule job now Scheduler scheduler = (Scheduler) CoreSpringFactory.getBean("schedulerFactoryBean"); scheduler.addJobListener(this); scheduler.scheduleJob(jobDetail, trigger); } catch (ParseException e) { logError("Can not parse log viewer cron expression", e); } catch (SchedulerException e) { logError("Problem when creating log viewer scheduler", e); }
416417418419420421422423424425426
} // Use this cron expression for debugging, tries to send data every minute //trigger.setCronExpression("0 * * * * ?"); trigger.setCronExpression(cronExpression); // Schedule job now scheduler.scheduleJob(jobDetail, trigger); } catch (ParseException e) { logError("Illegal cron expression for scheduling translation status generator", e); } catch (SchedulerException e) { logError("Can not start translation status generator scheduler", e);
227228229230231232233234235236237
JobDetail jobDetail = new JobDetail("LDAP_Cron_Syncer_Job", Scheduler.DEFAULT_GROUP, LDAPUserSynchronizerJob.class); CronTrigger trigger = new CronTrigger(); trigger.setName("LDAP_Cron_Syncer_Trigger"); trigger.setCronExpression(ldapSyncCronSyncExpression); // Schedule job now scheduler.scheduleJob(jobDetail, trigger); log.info("LDAP cron syncer is enabled with expression::" + ldapSyncCronSyncExpression); } catch (ParseException e) { setLdapSyncCronSync(false); log .error(