Advertising sustains the DA. Ads are hidden for members. Join today

Contributed modules

Ultimate Cron

Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites

Runs cron jobs individually in parallel using configurable rules, pool management and load balancing.

Features

  • Works out-of-the box in most cases (or aims to)
  • Parallel execution of cron jobs
  • Configuration per job (enable/disable, rules, etc.)
  • Multiple rules per cron job
  • Pool management and load balancing using Background process
  • Support for Drupal Queues
  • Overview of cron jobs
  • Log history of cron jobs
  • Status/error messages per cron job, providing easy debugging of troublesome cron jobs
  • Uses hook_cronapi() (Elysia Cron compatible, NOT 2.x, please use hook_cron_alter() for similar functionality)
  • hook_cron_alter() for easy adding/manipulating cron jobs
  • Poormans cron with keepalive a granularity of 1 minute
  • Drushsupport (list, start, enable/disable jobs from the command line)

Background Process Legacy

The background process launcher bundled with Ultimate Cron is internally called Background Process Legacy and will only be available when

Cache

The cache logger stores the last job message in the cache. Administration log messages, such as: Job modified, Job disabled, etc., are

Configuring

In order for Ultimate Cron to work properly, cron must be invoked every minute.

Core compatibility

Ultimate Cron hooks into drupal_cron_run(), so this function is entirely safe to run at any time, including from simpletests where Ultimate

Creating plugins

Please see the advanced help section in the module.

Crontab

The crontab scheduler provides the option to use unix-style crontab rules for scheduling jobs.

Database

The database logger logs cron job messages to the database (table: ultimate_cron_log), and can be configured at /admin/config/system/cron

Features

Highlight of Ultimate Crons features

General

This plugin contains the settings of, well, all the stuff I didn't know where else to put.

Hooks

See ultimate_cron.api.php

Installing

Download the module: drush dl ultimate_cron Enable it: drush en ultimate_cron

Jobs

The legend for the status icons on the job list page is:

Launchers

The launcher plugins are responsible for launching/running the cron jobs. There are 2 launchers bundled with Ultimate Cron: Serial and

Locking

Ultimate Cron has its own locking backend in order to support persistent and unlockable locks across requests.

Loggers

Loggers are responsible for logging job results. Ultimate Cron comes bundled with 2 loggers: Database and Cache.

Memory exhaust

Ultimate Cron uses PHP shutdown handlers to clean up stale locks, if a job dies. However, in some cases, the shutdown handlers cannot be run

Plugins

Ultimate Cron consists almost entirely of plugins which can be configured.

Poormans Cron

This plugin provides the basic framework for the Poormans Cron functionality.

Progress

Ultimate Cron supports an API for maintaining a progress throughout the cron jobs execution.

Queue

This plugin adds jobs for each cron queue defined in the system.

Related modules

Modules related to Ultimate Cron (extending or otherwise supporting)

Schedulers

Schedulers are responsible for determining when a job should run. Ultimate Cron comes bundled with 2 schedulers: Crontab and Simple.

Serial

The serial launcher runs each job consecutively, just like core cron would. The default settings for the serial launcher can be configured

Settings

Settings plugins can be used for arbitrary job settings or functionality.

Signals

Ultimate Cron supports an API for sending signals to cron jobs.

Simple

The simple scheduler builds on the crontab scheduler, but provides a simple set of presets instead of the full bloated crontab syntax.

Transactions

Queries that need to send information can cause problems if performed inside transactions (locks, progress signals, etc.).

Ultimate Cron 2.x

The documentation for Ultimate Cron 2.x

Upgrade path from 7.x-1.x and previous

Upgrading from an earlier version of Ultimate Cron to a 7.x-2.x version has some caveats

hax0r

A lot of the functionality in Ultimate Cron can be replaced by other modules. This includes the class used for the jobs.

Guide maintainers

arnested's picture
gielfeldt's picture