skip to Main Content

I’m using CentOS 7.

I want to run my laravel commands:

* * * * * cd /home/path/ && php artisan schedule:run >> /dev/null 2>&1

but when I run above code I got this error message:

-bash: cpanel3-skel: command not found

2

Answers


  1. You have to add this cron entry to your crontab, not to run it as a command. On CentOS, open crontab on text editor using following command:

    crontab -e
    

    Then add your cron entry * * * * * cd /home/path/ && php artisan schedule:run >> /dev/null 2>&1 to the end of the file and save the changes.

    Login or Signup to reply.
  2. Go to your terminal, ssh into your server, cd into your project and run this command.

    crontab -e
    

    This will open the server Crontab file, paste the code below into the file, save and then exit.

    * * * * * cd /home/path/ && php artisan schedule:run >> /dev/null 2>&1
    

    Now if you want to check the list of cron that are currently running use below command.

    crontab –l
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search