Interface ScheduleService

    • Method Detail

      • newJob

        JobEntry newJob​(int sec,
                        int min,
                        int hour,
                        int wd,
                        int day_mo,
                        String task)
                 throws TurbineException
        Factory method for a new Job Schedule a job to run on a certain point of time.
        Example 1: Run the DefaultScheduledJob at 8:00am every 15th of the month -
        JobEntry je = newJob(0,0,8,-1,15,"DefaultScheduledJob");
        Example 2: Run the DefaultScheduledJob at 8:00am every day -
        JobEntry je = newJob(0,0,8,-1,-1,"DefaultScheduledJob");
        Example 3: Run the DefaultScheduledJob every 2 hours. -
        JobEntry je = newJob(0,120,-1,-1,-1,"DefaultScheduledJob");
        Example 4: Run the DefaultScheduledJob every 30 seconds. -
        JobEntry je = newJob(30,-1,-1,-1,-1,"DefaultScheduledJob");
        Parameters:
        sec - Value for entry "seconds".
        min - Value for entry "minutes".
        hour - Value for entry "hours".
        wd - Value for entry "week days".
        day_mo - Value for entry "month days".
        task - Task to execute.
        Returns:
        A JobEntry.
        Throws:
        TurbineException - could not create job
      • listJobs

        List<? extends JobEntrylistJobs()
        List jobs in the queue. This is used by the scheduler UI.
        Returns:
        A List of jobs.
      • isEnabled

        boolean isEnabled()
        Determines if the scheduler service is currently active.
        Returns:
        Status of the scheduler service.
      • startScheduler

        void startScheduler()
        Starts the scheduler if not already running.
      • stopScheduler

        void stopScheduler()
        Stops the scheduler if ti is currently running.