PHP code example of antonchaikin / f3-scheduler
1. Go to this page and download the library: Download antonchaikin/f3-scheduler 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/ */
antonchaikin / f3-scheduler example snippets
\F3Scheduler\F7SchedulePlugin::register();
$f3->schedule::everyMinute(function () {
echo "Run every minute!";
});
$f3->schedule::daily("clear-cache");
$f3->schedule::on("0 0 1 * *", fn() => echo "Run every 1st of month!");
$f3->schedule::setErrorHandler(function ($e) {
error_log("[SCHEDULE ERROR] " . $e->getMessage());
});