I was wondering how one would go about building a PHP Cron Job "engine".
Essentially I am building a web app with "modules" which go and retrieve data at set intervals. I want these modules to be separate, but they all need to gather data at the same time (roughly) - some are once a day, others every 15 minutes.
With several popular CMS's, you set up a cron job to hit a file every 5 minutes or so - what you can then do is "register" the cron job in each module rather than having to edit the cron tab every time you install a module.
E.g.
*/5 * * * * php /path/to/cron.php
In the module you could then do something like
function task() {
// do some work
}
$cron->register(task())->daily();
Or similar - i'm not quite sure how to achieve it, nor am I sure what to search for!
Edit: I'm not looking for something that will edit the crontab, I am also trying to avoid an SQL database. I know it won't happen magically and I'm happy to edit a master "file" to "install" a module.
Edit 2: I suppose essentially what i'm looking for is like laravel do, but without the database... possible?
Hope it makes sense...