PHP code example of menatwork / cleanup
1. Go to this page and download the library: Download menatwork/cleanup library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
menatwork / cleanup example snippets
$GLOBALS['TL_CRON']['monthly'][] = array('CleanUp\CleanUp', 'run');
$GLOBALS['TL_CRON']['weekly'][] = array('CleanUp\CleanUp', 'run');
$GLOBALS['TL_CRON']['daily'][] = array('CleanUp\CleanUp', 'run');
// Contao 3 only
$GLOBALS['TL_CRON']['hourly'][] = array('CleanUp\CleanUp', 'run');
$GLOBALS['TL_CRON']['minutely'][] = array('CleanUp\CleanUp', 'run');
cd /var/www/contao/system/modules/cleanup
php CleanUpCaller.php