Search by

Tornado Engine core-module: scheduled jobs. Modules register jobs; admins choose when they run.

v0.5.0 2026-11-13 21:02 UTC

This package is auto-updated.

Last update: 2026-11-13 21:03:39 UTC


README

A Tornado Engine core-module: scheduled jobs. It runs Laravel's scheduler in its own container. Admins see every job on the Administration page, where they choose when it runs, turn it off, or run it now.

Adding a job from a module

use TornadoEngine\Cron\Cron;

$this->callAfterResolving(Cron::class, function (Cron $cron) {
    $cron->job('notes.cleanup', 'Clean up old notes', function () {
        $count = Note::prune();

        return "Removed {$count} notes"; // shown as the last result
    }, schedule: '0 3 * * *', description: 'Deletes notes older than a year.');
});

The schedule is a cron expression and is only the default. Times use the APP_TIMEZONE in .env.