I have currently installed sendy email sending script on amazon ec2 instance on php version 7. The problem I am facing is that whenever we create a new campaign the new campaign it simply shows pending and does not progresses. To resolve it I have to reset the cron job and again add the cron job command in crontab files which makes the sendy send email but again it fails.
*5 * * * /php /var/www/html/schedular.php
The command is something like as shown above. What could be the reason for cronjob not working after every time I reset it . I am not getting any error messages in the log files. What could be the possi ble reason for this issue.
2
Answers
The
schedular.php
is located in/var/www/html/
folder or inside the project folder? If the scheduler is inside the project folder then please update the cron with specific folder. If you use laravel then just update the cron:Try adding the location of your PHP before your script like so
*5 * * * /usr/bin/php /var/www/html/schedular.php
(Location of PHP may vary depend on your own circumstances)