Package hudson.triggers
Class SafeTimerTask
java.lang.Object
java.util.TimerTask
hudson.triggers.SafeTimerTask
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
AperiodicWork
,PeriodicWork
Wrapper so that a fatal error in
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
.
- Since:
- 1.124
- Author:
- Kohsuke Kawaguchi
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
doRun()
static File
The root path that should be used to put logs related to the tasks running in Jenkins.static SafeTimerTask
Lambda-friendly means of creating a task.final void
run()
Methods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
-
Constructor Details
-
SafeTimerTask
public SafeTimerTask()
-
-
Method Details
-
of
Lambda-friendly means of creating a task.- Since:
- 2.216
-
run
public final void run() -
doRun
- Throws:
Exception
-
getLogsRoot
The root path that should be used to put logs related to the tasks running in Jenkins.- Returns:
- the path where the logs should be put.
- Since:
- 2.114
- See Also:
-