Bad command errors in crontab file, can't install Hello,
Am trying to set my cronjob to run but after adding this cron command
php /home/bitcwlbc/public_html/myproject/artisan schedule:run >> /dev/null 2>&1
i keep getting error message saying
"_";2: Bad command
errors in crontab file, can't install
what could be the problem.
my kemel.php file is
Are you sure you are using * ?
Can you post the string as code using ``` on the line before it?
* * * * * php /home/bitcwlbc/public_html/myproject/artisan schedule:run >> /dev/null 2>&1
Yes..
"* * * * * php /home/bitcwlbc/public_html/myproject/artisan schedule:run >> /dev/null 2>&1"
not sure why system keep changing here.
this is exactly how my code looks like without " .
i only use it because it keep changing the * when i try to post here
My bet is that they set the * * * * * already. Just add this
php /home/bitcwlbc/public_html/myproject/artisan schedule:run >> /dev/null 2>&1
Commad added with no error will see if that works as i need 24 hours to confirm.
Thanks for your help and time
Not working friend, i run the cronjob manuelly and it works.
Am not sure if its my hosting that is casuing this as they did not allow me to run the cronjob per mins which how the scripts is configured to work.
I set to per 5 mins, could that be the reason why its not working?
Also is there anyway otherway i can set the cronjob with using crontab?
Yes make sure that it runs every minute. This is very vital
Anyway i can set cronjob to run automatically through commandline without having to manually run?
If you want to set up a cronjob using command line you can run crontab -e
Paste the full code in there
Please sign in or create an account to participate in this conversation.