cron command not found - CentOS 7

S.M_Emamian :

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

Dilip Hirapara :

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

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=18246&siteId=1