-
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
Description
It would be nice to be able to treat cron scripts in the same way as we do Page Logic files, almost as if (or maybe completely as if) the scripts are being routed.
Inside the crontab file, we could have something like the following:
0 5 * * * /cache?type=db&mode=daily
This would be triggered at 0500 every day, and it makes sense to store this script in the cron/cache.php
file.
Inside the file, it can behave completely like any other go function:
<?php
use Gt\Input\Input;
function go(Input $input, Database $db):void {
if($input->getString("type") === "db") {
$db->clean(); // or whatever...
}
}