public class SchedulerUtil extends Object
Constructor and Description |
---|
SchedulerUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
getExceptionAsString(Throwable t) |
static Date |
getNextExecution(TaskDefinition taskDefinition)
Gets the next execution time based on the initial start time (possibly years ago, depending
on when the task was configured in OpenMRS) and the repeat interval of execution.
|
static void |
sendSchedulerError(Throwable throwable)
Sends an email with system information and the given exception
|
static void |
shutdown()
Shutdown the scheduler service that is statically associated with the Context class.
|
static void |
startup(Properties p)
Start the scheduler given the following start up properties.
|
public static void startup(Properties p)
p
- properties used to start the servicepublic static void shutdown()
public static void sendSchedulerError(Throwable throwable)
error
- public static String getExceptionAsString(Throwable t)
e
- String
representation of the given exceptionpublic static Date getNextExecution(TaskDefinition taskDefinition)
taskDefinition
- the task definition to be executedTimer
Copyright © 2018 OpenMRS LLC.. All Rights Reserved.