Most mentioned links:MMBase documentation
MMBase Taglib reference
The reference for all tags mm
MMBase has a simple but effective application for cron jobs named MMBase Crontab. Cron jobs can be scheduled via a configuration file, or just by creating cronjob nodes.
The application has a config file at 'config/utils/crontab.xml'. The syntax of jobs is similar to those in cron on Unix et al.
Values are seperated by a |, in this example: timeschedule (run every morning at 1), Java class to run, a descriptive name and the last part is a piece off configuration to be used by the Java class.
0 1 * * *|org.mmbase.module.lucene.FullIndex|Lucene Full Index|forum
The following example prints memory usage to the log file every two hours.
0 */2 * * *|org.mmbase.applications.crontab.MMBaseStatsJob||Memory|short
An example config file in the Crontab application itself contains more examples.
Cron jobs can also be made as nodes. Which is even more flexible since you can easily edit them in one of the editors.
The same cron job from the first example but now as a node has the following field values:
The last field 'config' refers to the index to be done named 'forum', when left empty a full index will run on all indexes.
When you have multiple MMBase instances clustered on one server, you should relate you cronjobs node to the mmservers node of the server it should run on. Or it will run on all instances, which of course can also be a feature.
0 comments | leave a comment ↓