public abstract class SafeTimerTask extends TimerTask
TimerTask
will not terminate the timer.
Timer.get()
is a shared timer instance that can be used inside Jenkins to schedule recurring work.
But the usual usage is automatic via PeriodicWork
or AperiodicWork
.
Modifier and Type | Class and Description |
---|---|
static interface |
SafeTimerTask.ExceptionRunnable |
Constructor and Description |
---|
SafeTimerTask() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
doRun() |
static File |
getLogsRoot()
The root path that should be used to put logs related to the tasks running in Jenkins.
|
static SafeTimerTask |
of(SafeTimerTask.ExceptionRunnable r)
Lambda-friendly means of creating a task.
|
void |
run() |
cancel, scheduledExecutionTime
public static SafeTimerTask of(SafeTimerTask.ExceptionRunnable r)
public final void run()
public static File getLogsRoot()
AsyncAperiodicWork.getLogFile()
,
AsyncPeriodicWork.getLogFile()
Copyright © 2004–2022. All rights reserved.