Friday, November 12, 2021

[SOLVED] Crobjob not automatic running in redhat server

Issue

I have setup cronjob for root user in redhat server environment as follows by typing crontab -e for delete file in storage project

in my laravel project running if i run php artisan schedule:run, but not automatic run for every 5 minute,,, checked for var/log/cron i see cronjob automatic running

var/log/cron

shcedule:run


Solution

Solved

1. make sure your time (server site) e.g running every 30mnt

*/30 * * * * cd /path-to-your-project && php artisan schedule:run

2. make sure your time (laravel site) e.g running at 00:30

30 0 * * *

so if your project (laravel) running with 30mnt (e.g 30 0 * * ) so you must setup server with 30mnt (/30 * * * *)



Answered By - Diale