...
Scheduling, unscheduling and rescheduling custom jobs
Scheduling custom jobs
The For scheduling method of custom jobs the IScheduler.schedule method can be used. It has the following four parameters four parameters:
- the class class of the job
- the paramteres of the job
- can be created by calling the IScheduler.createJobParameters().
- the schedule of the job
- can be created by calling IScheduler.getScheduleBuilder().onDate(Date date) or IScheduler.getScheduleBuilder().now() methods
- the ID of the job
- can be created by calling the IScheduler.createJobId(String jobId)
UI Expand |
---|
|
Custom jobs can be scheduled using the SpringQuartzScheduler class in the Quartz Scheduler Component. Code Block |
---|
IJobParameters parameters = scheduler.createJobParameters();
ISchedule schedule = scheduler.getScheduleBuilder().now();
IJobId jobId = scheduler.createJobId();
scheduler.schedule(MyJob.class, parameters, schedule, jobId); |
|
UI Expand |
---|
|
Custom jobs can be scheduled using the QuartzScheduler class in the Quartz Scheduler Component. Code Block |
---|
BQ.IJobParameters parameters = scheduler.createJobParameters();
BQ.ISchedule schedule = scheduler.getScheduleBuilder().now();
BQ.IJobId jobId = scheduler.createJobId();
scheduler.schedule(typeof(MyJob), parameters, schedule, jobId); |
|
Unscheduling custom jobs
For unschdeuling custom jobs the IScheduler.unschedule method can be used which has only one paramters, the id of the job.
UI Expand |
---|
|
Custom jobs can be unscheduled using the SpringQuartzScheduler class in the Quartz Scheduler Component. Code Block |
---|
scheduler.unschedule(jobId); |
|
UI Expand |
---|
|
Custom jobs can be unscheduled using the QuartzScheduler class in the Quartz Scheduler Component. Code Block |
---|
scheduler.unschedule(jobId); |
|
Rescheduling custom jobs
For reschdeuling custom jobs the IScheduler.reschedule method can be used. This method has two parameters: de id of the job and the it's new schedule.
UI Expand |
---|
|
Custom jobs can be rescheduled using the SpringQuartzScheduler class in the Quartz Scheduler Component. Code Block |
---|
BQ.ISchedule schedule = scheduler.getScheduleBuilder().now();
scheduler.reschedule(jobId, schedule); |
|
UI Expand |
---|
|
Custom jobs can be rescheduled using the QuartzScheduler class in the Quartz Scheduler Component. Code Block |
---|
BQ.ISchedule schedule = scheduler.getScheduleBuilder().now();
scheduler.reschedule(jobId, schedule); |
|