Iam trying to develop a cron job for a command to send email. I am completely new to cron jobs so I dont really know how it works.
Trying the command by myself in the console works perfectly. But when a set a cron job in CPANEL its not workingrs. I am using Laravel 5, can anyone help please?
Thanks!
My cron job: php /home/reporting/public_html/bsk/artisan schedule:run >> /dev/null 2>&1
2
Answers
In Cpanel: (cPanel & WHM version 62)
Follow the menus : Home → Advanced → Cron Jobs and add :
For Reference :
/home/user/public_html/index.php
On a Unix/Linux Server: use the cmdline
crontab -e
to enter the cron editor and add the line :Cron Job will not work, if you are about to schedule the command as once a day (i.e., 00:00) iff, same time is not reflected in a
$schedule->command();
objectIf the commands were incorrect, I used to get this warning in my Email as
In
Kernel.php
you should specifyYou should add the command from the cPanel server as
This will keep all the logs in
/home/xyz/public_html/log_laravel