Interface SchedulerManager


  • public interface SchedulerManager
    Manager of Scheduler instances.
    • Method Detail

      • createScheduler

        ConnectorResponse createScheduler()
        Creates a new scheduler instance.
        Returns:
        a response with the code OK if the creation was successful, otherwise a response with an error code and an error message
      • resumeScheduler

        ConnectorResponse resumeScheduler()
        Resumes a scheduler task.
        Returns:
        a response with the code OK if the resuming was successful, otherwise a response with an error code and an error message
      • pauseScheduler

        ConnectorResponse pauseScheduler()
        Pauses a scheduler task.
        Returns:
        a response with the code OK if the pausing was successful, otherwise a response with an error code and an error message
      • schedulerExists

        boolean schedulerExists()
        Checks if the scheduler task exists.
        Returns:
        true if the scheduler task exists, otherwise false
      • alterSchedulerSchedule

        void alterSchedulerSchedule​(String schedule)
        Changes scheduler task schedule
        Parameters:
        schedule - CRON schedule to be changed to.
      • getInstance

        static SchedulerManager getInstance​(Session session)
        Gets a new instance of the default scheduler manager implementation.

        Default implementation of the scheduler manager uses:

        The default scheduler creation process consists of:

        • creation of STATE.SCHEDULER_TASK task
        • granting of MONITOR task privilege to the ADMIN application role
        • resumption of the task
        Parameters:
        session - Snowpark session object
        Returns:
        a new scheduler manager instance