@Extension @Symbol(value="cron") public static class Trigger.Cron extends PeriodicWork
TimerTrigger
and schedules build.SafeTimerTask.ExceptionRunnable
ExtensionPoint.LegacyInstancesAreScopedToHudson
DAY, 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, init
getLogsRoot, of, run
cancel, scheduledExecutionTime
public long getRecurrencePeriod()
PeriodicWork
Hudson 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 PeriodicWork
public long getInitialDelay()
PeriodicWork
By default it chooses the value randomly between 0 and PeriodicWork.getRecurrencePeriod()
getInitialDelay
in class PeriodicWork
public void doRun()
doRun
in class SafeTimerTask
Copyright © 2004–2022. All rights reserved.