contao-community-alliance / events-cron
Contao开源CMS的Cron事件
1.0.2
2014-12-15 02:44 UTC
Requires
- php: >=5.3
- contao-community-alliance/composer-plugin: ~2.0
- contao-community-alliance/event-dispatcher: ~1.0
- contao/core: >=2.11,<4.0-dev
This package is auto-updated.
Last update: 2024-09-06 09:00:53 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 };
查看事件调度器文档以获取更多关于如何在事件上监听的示例。