Cron event for Contao Open Source CMS

Installs: 3 105

Dependents: 3

Suggesters: 0

Security: 0

Stars: 1

Watchers: 9

Forks: 2

Open Issues: 1

Type:contao-module

pkg:composer/contao-community-alliance/events-cron

1.0.2 2014-12-15 02:44 UTC

This package is auto-updated.

Last update: 2025-10-06 11:36:29 UTC


README

Provide the cron hooks as events.

$GLOBALS['TL_EVENTS']['cron.monthly'][] = function($event) {
	// run monthly
};

$GLOBALS['TL_EVENTS']['cron.weekly'][] = function($event) {
	// run weekly
};

$GLOBALS['TL_EVENTS']['cron.daily'][] = function($event) {
	// run daily
};

$GLOBALS['TL_EVENTS']['cron.hourly'][] = function($event) {
	// run hourly
};

// only support in Contao 3.0 or newer
$GLOBALS['TL_EVENTS']['cron.minutely'][] = function($event) {
	// run minutely
};

See the event dispatcher documentation for more examples how to listen on an event.