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
- Replace the command with your absolute binary and script paths.
- Redirect stdout and stderr to a log during testing.
- 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