Cron Every 5 Minutes Example

A common five-field cron example with logging. Use absolute paths because cron has a minimal environment.

Crontab line
*/5 * * * * /usr/bin/php /var/www/app/artisan schedule:run >> /var/log/app-cron.log 2>&1

How to use this example

  1. Replace the command with your absolute binary and script paths.
  2. Redirect stdout and stderr to a log during testing.
  3. Confirm server timezone before relying on exact timing.

Notes

  • Classic cron does not include seconds.
  • Run the command manually as the same user before enabling cron.

Related tools and fixes

Last updated: May 18, 2026