PHP code example of webhubworks / craft-ohdear
1. Go to this page and download the library: Download webhubworks/craft-ohdear 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/ */
webhubworks / craft-ohdear example snippets
use webhubworks\ohdear\health\checks\Check;
return [
'healthChecks' => [
Check::cve()->cachedViaCron(60 * 60 * 12),
Check::abandonedPackages()->cachedViaCron(60 * 60 * 12),
// …
],
];
cron
*/30 * * * * cd /path/to/site && php craft ohdear/health-check/refresh >/dev/null 2>&1