org.mmbase.applications.crontab.modules
Class CrontabModule
java.lang.Object
org.mmbase.util.functions.FunctionProvider
org.mmbase.util.functions.DescribedFunctionProvider
org.mmbase.module.Module
org.mmbase.module.ReloadableModule
org.mmbase.module.WatchedReloadableModule
org.mmbase.applications.crontab.modules.CrontabModule
- All Implemented Interfaces:
- Descriptor
public class CrontabModule
- extends WatchedReloadableModule
Starts a crontab for MMBase as a Module.
- Version:
- $Id: CrontabModule.java 42996 2010-07-29 10:13:35Z michiel $
- Author:
- Michiel Meeuwissen
|
Method Summary |
protected void |
addJob(Map.Entry<String,String> entry)
|
void |
init()
Interpretates all initParameters as crontab entries. |
void |
readMoreJobs()
|
void |
reload()
All previously added entries are removed from the cron-daemon and the currently configured
ones are added (init is called). |
protected void |
shutdown()
Shuts down the module. |
| Methods inherited from class org.mmbase.module.Module |
addInitParameters, checkModules, getInitParameter, getInitParameter, getInitParameter, getInitParameters, getInitParameters, getMaintainer, getModule, getModule, getModule, getModule, getModuleInfo, getModuleLoader, getModuleReader, getModuleReader, getModules, getState, getStates, getVersion, hasModule, hasStarted, loadInitParameters, loadInitParameters, maintainance, setInitParameter, setMaintainer, setState, setVersion, shutdownModules, startModule, startModules |
| Methods inherited from class org.mmbase.util.functions.DescribedFunctionProvider |
getDefaultLocale, getDescription, getDescription, getGUIName, getGUIName, getLocalizedDescription, getLocalizedGUIName, getName, setDescription, setDescription, setGUIName, setGUIName, setLocalizedDescription, setLocalizedGUIName, setName |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cronDaemon
protected final CronDaemon cronDaemon
listFunction
protected Function<Set<CronEntry>> listFunction
- Since:
- MMBase-1.8
ENTRY
public static final Parameter<String> ENTRY
THREAD
public static final Parameter<Integer> THREAD
MACHINE
public static final Parameter<String> MACHINE
kickFunction
protected Function<Boolean> kickFunction
- Since:
- MMBase-1.8
interruptFunction
public Function<Boolean> interruptFunction
- Since:
- MMBase-1.8
aliveFunction
protected Function<Boolean> aliveFunction
- Since:
- MMBase-1.8
stopFunction
protected Function<Boolean> stopFunction
- Since:
- MMBase-1.8
startFunction
protected Function<Boolean> startFunction
- Since:
- MMBase-1.8
reloadFunction
protected Function<Boolean> reloadFunction
- Since:
- MMBase-1.8
CrontabModule
public CrontabModule()
init
public void init()
- Interpretates all initParameters as crontab entries. The key is not very important but must
be unique. The value are actually two or three or four values, separated by tabs newlines or '|',
whatever you like most.
<cron time>
<class name of a CronJob>
[<description>]
[<configuration-string>]
- Overrides:
init in class Module
shutdown
protected void shutdown()
- Description copied from class:
Module
- Shuts down the module. This method is called by shutdownModules.
- Overrides:
shutdown in class Module
addJob
protected void addJob(Map.Entry<String,String> entry)
reload
public void reload()
- All previously added entries are removed from the cron-daemon and the currently configured
ones are added (init is called).
- Specified by:
reload in class ReloadableModule
readMoreJobs
public void readMoreJobs()
MMBase 2.0-SNAPSHOT - null