Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/contao-community-alliance/events-cron
Cron events for Contao Open Source CMS
https://github.com/contao-community-alliance/events-cron
Last synced: about 2 months ago
JSON representation
Cron events for Contao Open Source CMS
- Host: GitHub
- URL: https://github.com/contao-community-alliance/events-cron
- Owner: contao-community-alliance
- Created: 2014-01-01T22:36:31.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2018-09-14T14:26:41.000Z (over 6 years ago)
- Last Synced: 2024-11-30T12:04:13.938Z (about 2 months ago)
- Language: PHP
- Size: 184 KB
- Stars: 1
- Watchers: 11
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Events: Cron
Provide the cron hooks as events.
```php
$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](https://github.com/contao-community-alliance/event-dispatcher#listen-on-events)
for more examples how to listen on an event.