public class CronFacade extends Object implements FilenameFilter
T-Plan Robot Enterprise, (C) 2009-2022 T-Plan Limited. All rights reserved.
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_TIME_ENTRY |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(File dir,
String name) |
static void |
compile(String cronPattern)
Compile the cron time pattern.
|
static void |
deschedule(String id) |
static boolean |
isCronAvailable() |
static boolean |
isRunning() |
static String |
schedule(String schedulingPattern,
Runnable task) |
static void |
setDaemon(boolean on) |
static void |
start() |
static void |
stop() |
public static final String DEFAULT_TIME_ENTRY
public static boolean isCronAvailable()
public static void compile(String cronPattern) throws IllegalArgumentException, IllegalStateException
cronPattern
- the cron time pattern without the trailing
options and process arguments.IllegalArgumentException
- when the pattern is invalid.IllegalStateException
- when the cron4j support is not available
(the library is not on the class path or in the install folder).public static void start() throws IllegalArgumentException, IllegalStateException
public static void stop() throws IllegalArgumentException, IllegalStateException
public static String schedule(String schedulingPattern, Runnable task) throws IllegalArgumentException, IllegalStateException
public static void deschedule(String id) throws IllegalArgumentException, IllegalStateException
public static void setDaemon(boolean on) throws IllegalArgumentException, IllegalStateException
public static boolean isRunning() throws IllegalArgumentException, IllegalStateException
public boolean accept(File dir, String name)
accept
in interface FilenameFilter