Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.scheduling.config
Class CronTask

    java.lang.Object
      org.springframework.scheduling.config.Task
          org.springframework.scheduling.config.TriggerTask
              org.springframework.scheduling.config.CronTask

    public class CronTask

extends TriggerTask

`TriggerTask` implementation defining a `Runnable` to be executed according to a standard cron expression.

Since:
  3.2
Author:
  Chris Beams
See Also:
  `Scheduled.cron()`, `ScheduledTaskRegistrar.setCronTasksList(java.util.List)`, `TaskScheduler`

Constructor Summary
`CronTask(java.lang.Runnable runnable, CronTrigger cronTrigger)` Create a new `CronTask`.
`CronTask(java.lang.Runnable runnable, java.lang.String expression)` Create a new `CronTask`.

Method Summary
`java.lang.String` | `getExpression()`

Methods inherited from class org.springframework.scheduling.config.TriggerTask
`getTrigger`

Methods inherited from class org.springframework.scheduling.config.Task
`getRunnable`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CronTask

    public CronTask(java.lang.Runnable runnable,
                    java.lang.String expression)

  Create a new `CronTask`.

  Parameters:
    `runnable` - the underlying task to execute
    `expression` - cron expression defining when the task should be executed

### CronTask

    public CronTask(java.lang.Runnable runnable,
                    CronTrigger cronTrigger)

  Create a new `CronTask`.

  Parameters:
    `runnable` - the underlying task to execute
    `cronTrigger` - the cron trigger defining when the task should be executed

Method Detail

### getExpression

    public java.lang.String getExpression()

Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD