@Extension public static class Trigger.Cron extends PeriodicWork
TimerTrigger and schedules build.ExtensionPoint.LegacyInstancesAreScopedToHudsonDAY, HOUR, logger, MIN| Constructor and Description |
|---|
Cron() |
| Modifier and Type | Method and Description |
|---|---|
void |
doRun() |
long |
getInitialDelay()
Gets the number of milliseconds til the first execution.
|
long |
getRecurrencePeriod()
Gets the number of milliseconds between successive executions.
|
all, initruncancel, scheduledExecutionTimepublic long getRecurrencePeriod()
PeriodicWorkHudson calls this method once to set up a recurring timer, instead of calling this each time after the previous execution completed. So this class cannot be used to implement a non-regular recurring timer.
IOW, the method should always return the same value.
getRecurrencePeriod in class PeriodicWorkpublic long getInitialDelay()
PeriodicWork
By default it chooses the value randomly between 0 and PeriodicWork.getRecurrencePeriod()
getInitialDelay in class PeriodicWorkpublic void doRun()
doRun in class SafeTimerTaskCopyright © 2019. All rights reserved.