Name: mod_cron Purpose: Execute scheduled commands Author: Badlop Type: Module Requirements: ejabberd 1.1.x Download:
- Source code from ejabberd-modules SVN
- mod_cron.beam for ejabberd 2
Links
- This program implements a similar concept in erlang: cron.erl
Specifying a Host?
Is there a way to specify running a cron for a specific Host? If you currently setup a cron it runs the same function on all Hosts.
Jeffrey R. | dS
Use webadmin, or ejabberd svn, or apply a patch
Currently, you set a task this way:
This starts a mod_cron in each vhost, and configures all them with the same options. This means each vhost will run this task.
To enable a module only in a vhost, or to have different configurations for each vhost, you need to use the webadmin.
A feature was recently included in ejabberd svn which allows to define per-vhost modules:Config file: add a way to append values to config options . So, if you use a recent version of ejabberd SVN, you can enable mod_cron only in a vhost, and only this one will run the task. To do that, use only this configuration:
If you don't want to update to ejabberd SVN, you can find the patch in Bugzilla:New option host_config_add .
cron at 8:00
howto setup mod_cron to run every day at 8:00 ?