org.apache.turbine.services.schedule

## Class TorqueSchedulerService

- java.lang.Object
- - org.apache.turbine.services.BaseInitable
  - - org.apache.turbine.services.BaseService
    - - org.apache.turbine.services.TurbineBaseService
      - - org.apache.turbine.services.schedule.AbstractSchedulerService
        - - org.apache.turbine.services.schedule.TorqueSchedulerService

- All Implemented Interfaces:
    Initable, ScheduleService, Service

  Deprecated.
  Use `QuartzSchedulerService` instead

      @Deprecated
      public class TorqueSchedulerService
      extends AbstractSchedulerService

  Service for a cron like scheduler.
  Version:
    $Id: TorqueSchedulerService.java 534527 2007-05-02 16:10:59Z tv $
  Author:
    Dave Bryson, Quinton McCombs

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.turbine.services.schedule.AbstractSchedulerService

      `AbstractSchedulerService.MainLoop`

  - ### Field Summary

    - ### Fields inherited from class org.apache.turbine.services.schedule.AbstractSchedulerService

      `enabled, log, mainLoop, scheduleQueue, thread`

    - ### Fields inherited from class org.apache.turbine.services.BaseService

      `configuration, name, serviceBroker`

    - ### Fields inherited from class org.apache.turbine.services.BaseInitable

      `initableBroker, isInitialized`

    - ### Fields inherited from interface org.apache.turbine.services.schedule.ScheduleService

      `INTIALLY_ACTIVE, LOGGER_NAME, SERVICE_NAME`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TorqueSchedulerService()` Deprecated.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `JobEntry` | `getJob(int oid)` Deprecated. Get a specific Job from Storage.
    `protected List<? extends JobEntry>` | `loadJobs()` Deprecated. Load all jobs from configuration storage
    `JobEntry` | `newJob(int sec, int min, int hour, int wd, int day_mo, String task)` Deprecated. Factory method for a new Job Schedule a job to run on a certain point of time.
    `void` | `removeJob(JobEntry je)` Deprecated. Remove a job from the queue.
    `void` | `updateJob(JobEntry je)` Deprecated. Add or update a job.

    - ### Methods inherited from class org.apache.turbine.services.schedule.AbstractSchedulerService

      `addJob, clearThread, getThread, init, isEnabled, listJobs, nextJob, restart, setEnabled, shutdown, startScheduler, stopScheduler`

    - ### Methods inherited from class org.apache.turbine.services.TurbineBaseService

      `init, init`

    - ### Methods inherited from class org.apache.turbine.services.BaseService

      `getConfiguration, getName, getProperties, getServiceBroker, setName, setServiceBroker`

    - ### Methods inherited from class org.apache.turbine.services.BaseInitable

      `getInit, getInitableBroker, setInit, setInitableBroker`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.apache.turbine.services.Service

      `getConfiguration, getName, getProperties, setName, setServiceBroker`

    - ### Methods inherited from interface org.apache.turbine.services.Initable

      `getInit, init, setInitableBroker`

- - ### Constructor Detail

    - #### TorqueSchedulerService

          public TorqueSchedulerService()

      Deprecated.

  - ### Method Detail

    - #### loadJobs

          protected List<? extends JobEntry> loadJobs()
                                               throws TurbineException

      Deprecated.
      Load all jobs from configuration storage
      Specified by:
        `loadJobs` in class `AbstractSchedulerService`
      Returns:
        the list of pre-configured jobs
      Throws:
        `TurbineException`

    - #### newJob

          public JobEntry newJob(int sec,
                        int min,
                        int hour,
                        int wd,
                        int day_mo,
                        String task)
                          throws TurbineException

      Deprecated.
      Description copied from interface: `ScheduleService`
      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");
      Specified by:
        `newJob` in interface `ScheduleService`
      Specified by:
        `newJob` in class `AbstractSchedulerService`
      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
      See Also:
        `ScheduleService.newJob(int, int, int, int, int, java.lang.String)`

    - #### getJob

          public JobEntry getJob(int oid)
                          throws TurbineException

      Deprecated.
      Get a specific Job from Storage.
      Specified by:
        `getJob` in interface `ScheduleService`
      Specified by:
        `getJob` in class `AbstractSchedulerService`
      Parameters:
        `oid` - The int id for the job.
      Returns:
        A JobEntry.
      Throws:
        `TurbineException` - job could not be retrieved.

    - #### removeJob

          public void removeJob(JobEntry je)
                         throws TurbineException

      Deprecated.
      Remove a job from the queue.
      Specified by:
        `removeJob` in interface `ScheduleService`
      Specified by:
        `removeJob` in class `AbstractSchedulerService`
      Parameters:
        `je` - A JobEntry with the job to remove.
      Throws:
        `TurbineException` - job could not be removed

    - #### updateJob

          public void updateJob(JobEntry je)
                         throws TurbineException

      Deprecated.
      Add or update a job.
      Specified by:
        `updateJob` in interface `ScheduleService`
      Specified by:
        `updateJob` in class `AbstractSchedulerService`
      Parameters:
        `je` - A JobEntry with the job to modify
      Throws:
        `TurbineException` - job could not be updated

Copyright © 2000–2018 The Apache Software Foundation. All rights reserved.