Class JobRunner

java.lang.Object
com.axelor.quartz.JobRunner

@Singleton public class JobRunner extends Object
The JobRunner controls the scheduler.

It configures the Scheduler from the job configuration provided from the database. It also provides some public methods to start/restart/stop the scheduler.
  • Constructor Details

    • JobRunner

      public JobRunner()
  • Method Details

    • isEnabled

      public boolean isEnabled()
    • update

      public void update(MetaSchedule schedule) throws org.quartz.SchedulerException
      Update the given job.
      Parameters:
      schedule - the scheduled job
      Throws:
      org.quartz.SchedulerException
    • update

      public void update(String group) throws org.quartz.SchedulerException
      Update all the jobs for the given tenant group.
      Parameters:
      group - the tenant group
      Throws:
      org.quartz.SchedulerException
    • remove

      public void remove(MetaSchedule schedule) throws org.quartz.SchedulerException
      Remove the given job.
      Parameters:
      schedule - the job to remove
      Throws:
      org.quartz.SchedulerException
    • remove

      public void remove(String group) throws org.quartz.SchedulerException
      Remove all the jobs of the given tenant group.
      Parameters:
      group - the tenant group
      Throws:
      org.quartz.SchedulerException
    • init

      public void init()
      Initialize the scheduler.
    • shutdown

      public void shutdown()
      Shutdown the scheduler.
    • restart

      public void restart()
      Restart tasks
    • stop

      public void stop()
      Stop tasks
    • onRemove

      public void onRemove(@Named("remove") @EntityType(MetaSchedule.class) PreRequest event)