Search code examples
linuxlaravelcronredhatkubernetes-cronjob

Crobjob not automatic running in redhat server


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

  • you only need to add the following Cron entry to your server

    * * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1
    

    More info check laravel doc