Skip to main content
Scheduled jobs are cron entries Shipways writes into the deploy user’s crontab. They live on the server’s Processes tab, alongside daemons.

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:
Every minute, and the application decides what actually runs. Everything you schedule in 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.

Timezone

Jobs are written in the server’s own time. A job set for three in the morning happens at three in the morning wherever the server’s timezone says that is, and changing that setting moves every job on the machine at once.

Knowing it ran

Cron mails output to the local user, which on a server nobody reads mail on is the same as discarding it. A job that has stopped running produces no failure, no output and no error, and looks exactly like one that is running fine. If it matters, put a heartbeat on it.