The expression
Five fields: minute, hour, day of month, month, day of week. The expression is checked before it is written, because cron does not report a bad line — it ignores the whole file. One malformed entry and nothing scheduled on that machine runs, silently, until somebody notices a week of missing work.The command
Use the full path to PHP./usr/bin/php8.4 artisan backup:run, not php artisan backup:run. Cron runs with a minimal environment and a PATH that is
not your shell’s, and bare php resolves to
the machine’s CLI default if it resolves at
all.
Give the directory too, normally the site’s current symlink.
The Laravel scheduler
A Laravel or Statamic site offers Add scheduler, which writes the one entry that framework wants:routes/console.php depends on this one line existing.
Without it, nothing the application schedules happens — and nothing complains,
because there is no failure to report.