designs2/events-cron

Contao开源CMS的定时事件

安装: 16

依赖: 0

建议者: 0

安全: 0

星星: 0

观察者: 1

分支: 2

类型:contao-module

1.0.2 2014-12-15 02:44 UTC

This package is not auto-updated.

Last update: 2024-10-02 18:15:06 UTC


README

将定时钩子作为事件提供。

$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
};

有关如何监听事件的更多示例,请参阅事件调度器文档