Class QScheduleManager

java.lang.Object
com.kingsrook.qqq.backend.core.scheduler.QScheduleManager

public class QScheduleManager extends Object
QQQ service to manage scheduled jobs, using 1 or more Schedulers - implementations of the QSchedulerInterface
  • Method Details

    • initInstance

      public static QScheduleManager initInstance(QInstance qInstance, Supplier<QSession> systemUserSessionSupplier) throws QException
      Singleton initiator - e.g., must be called to initially initialize the singleton before anyone else calls getInstance (they'll get an error if they call that first).
      Throws:
      QException
    • defineDefaultSchedulableTypesInInstance

      public static void defineDefaultSchedulableTypesInInstance(QInstance qInstance)
    • getInstance

      public static QScheduleManager getInstance()
      Singleton accessor
    • start

      public void start() throws QException
      Throws:
      QException
    • stop

      public void stop()
    • stopAsync

      public void stopAsync()
    • setupAllNewSchedules

      public void setupAllNewSchedules() throws QException
      Throws:
      QException
    • setupAllSchedules

      public void setupAllSchedules() throws QException
      Throws:
      QException
    • setupScheduledJob

      public void setupScheduledJob(ScheduledJob scheduledJob) throws QException
      Throws:
      QException
    • unscheduleAll

      public void unscheduleAll()
    • unscheduleScheduledJob

      public void unscheduleScheduledJob(ScheduledJob scheduledJob) throws QException
      Throws:
      QException
    • unInit

      public void unInit()
      reset the singleton instance (to null); clear the map of schedulers. Not clear it's ever useful to call in main-code - but can be used for tests.