问题
I'm developing a Symfony project and I've 4 commands which allows me to update telephony and emails data thanks to OVH' Api. When I use my terminal on local ( php bin/console converseo:updateTelephony ) the command works fine.
Now, I want to put these commands in crontab with the cron interface from Ovh. I made a php file test.php :
<?php
shell_exec("sh test.sh");
?>
And test.sh :
#!/bin/bash
/usr/local/php5.6/bin/php /homez.number/mysite/www/bin/console converseo:updateBilling
And I get the error :
[Symfony\Component\Console\Exception\CommandNotFoundException]
Command "converseo:updateBilling" is not defined.
Did you mean one of these?
converseo:updateBilling
converseo:updateEmailCount
converseo:updateTelephony
converseo:updateEmail
The lines are EXACTLY the sames, I don't understand why I get this error.
Thanks a lot for yours answers !
来源:https://stackoverflow.com/questions/44494242/ovh-cron-jobs-symfony-command