1. Go to this page and download the library: Download cronwatch/craft 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/ */
cronwatch / craft example snippets
return [
// Console commands the crontab runs, by route, with what the crontab says.
'commands' => [
'resave/entries' => ['schedule' => '0 3 * * *', 'timezone' => 'Europe/London'],
'app/reports/send' => ['schedule' => '*/15 * * * *', 'grace' => '5m', 'name' => 'send-reports'],
'app/cleanup' => true, // runs and failures only, no schedule
],
// Queue job classes, each attempt a run.
'queueJobs' => [
modules\jobs\SyncInventory::class => ['failuresBeforeAlert' => 3],
],
];