Elysia cron

!NEW Release 2.0 is finally out, with D7 support, code & performance improvements and a lot of new features!

Elysia Cron extends Drupal standard cron, allowing a fine grain control over each task and several ways to add custom cron jobs to your site.

  • [NEW IN 2.0] Set the timings and frequencies of each cron task (you can run some jobs every day at a specified hour, other only monthly and so on...). For each task you can simply choose between some frequently used options ("once a day", "once a month" ...), or use a powerful "linux crontab"-like syntax to set the accurate timings. You can even define your frequently used options to speed up site configuration.
  • Parallel execution of cron task: you can group jobs in channels and execute then simultaneously: so a task that takes a lot of time to execute won't block other tasks that need to be executed every 5 minutes...
  • You can disable all tasks, an entire channel or a single task.
  • Change the priority/order of task execution.
  • Manual force the execution of a cron tasks.
  • Detailed overview of cron status with time statistics for single tasks and channels.
  • [NEW IN 2.0] powerful API for module developers: you can define extra cron tasks for your modules, each one with own default timings (site administrators can override them by configuration, other modules via hook_alter). Elysia Cron 2.0 gives a brand new API support (compatible with 1.0 version) with a lot of features.
  • Administrators can define custom jobs (call to functions with parameters), via the "script" option.
  • Several optimization for frequent cron calls and error handling.
  • Protection from external cron calling by cron_key or allowed host list.

Elysia has no dependencies with contributed modules, and doesn't need to patch the core: it can be used in minimal Drupal installation with only core modules.
It also can be used in a Drupal install profile.

3rd party integration:

  • [NEW IN 2.0] Ping feature, for external tracking services like host-tracker to tell whether cron is functioning properly on your site.
  • [NEW IN 2.0] Drush support: you can call "drush elysia-cron" to manually run extended cron.
  • [NEW IN 2.0] CTools support for exports/backup of task settings.
  • [NEW IN 2.0] Features support.


Elysia cron is usually used in large sites that needs performance optimization.

  • Avoid drupal peak loads by distributing heavy load tasks during quiet periods of the day: for example you may want to rebuild the XML Sitemap of your site at 2:00AM in the morning, where usually only a few people are visiting your site. You can even move some tasks to be executed only once a month (log rotation, old records expiry...).
  • If you have tasks that should be executed very often, but don't want to execute ALL drupal cron tasks that often! For example, you may want to check for emails that needs to be sent to your users every 2 minutes. Standard cron is managed in a "monolithic" way, so even if you find out how to execute it every 2 minutes, you will end in having all cron tasks executed so often, with a lot of performance problems.
  • Fine tune cron cache management : drupal cron will invalidate variable cache every cron run, and this is a great performance problem if you have a frequently called task. Elysia cron optimize cache management, and doesn't need to invalidate cache.
  • Setup tasks that should be run at a precise time: for example if you want to send a SimpleNews newsletter every monday at 9:00AM, you can do it.
  • Parallel execution: if you have a task that takes a lot of time to execute, you can setup a different channel for it so it won't block other tasks that need to be executed every 5 minutes.
  • Turn off (disable) a cron task/feature you don't need.
  • Debug system cron problems. If your cron does not terminate correctly you can use extended logging, see at each cron timings and disable task to track down the problem.


For the basic install you only need to enable the module and Elysia Cron will be up and running.

You can stop here if you don't need a great precision over task execution and you don't have to execute a task more often than once an hour.
For example, if you need only the "Once a day", "Once a week" or "Once a month" schedule rules the basic install is fine.
(For D6 users that want to stop here: you should have installed Drupal crontab as described in Drupal INSTALL guide).

However to get the full potential out of elysia cron and have the full control over you tasks a further step is needed: you need to configure the system crontab to execute drupal cron every minute.
Follow the Drupal guide about this: http://drupal.org/cron
The only difference is that you should use the "* * * * *" rule part instead of "0 * * * *" or "45 * * * *" as described in the guide.

API: Example of a module defining its cron jobs

function example_cronapi($op, $job = NULL) {

  $items['example_sendmail_cron'] = array(
    'description' => 'Send mail with news',
    'rule' => '0 */2 * * *', // Every 2 hours
    // Note: i don't need to define a callback, i'll use "example_sendmail_cron"
    // function

  $items['example_news_cron'] = array(
    'description' => 'Send mail with news',
    'rule' => '*/5 * * * *', // Every 5 minutes
    // i must call: example_news_fetch('all')
    'callback' => 'example_news_fetch',
    'arguments' => array('all'),

  return $items;

function example_sendmail_cron() {
  // ...

function example_news_fetch($what) {
  // ...

More info

README.txt (Full overview)
INSTALL.txt (Installation instructions)
API.txt (Module developers API docs)

External documentation:
Installation guide, usage instructions and examples @ www.cmswiki.net (ITALIAN Language, for 1.0 version)


Elysia cron is a part of the Elysia Community Platform project (but could be used stand alone with no limitation).
Developing is sponsored by Void Labs s.n.c (http://www.void.it)

Project Information