Execute Symfony Command as a cron on mutualised server OVH

I want to execute à Symfony3 command on a OVH mutualised server but i still get an error.

i created a sh script "verifyCampaign.sh" and put in www/cron :

cd /home/siteName/www/
/usr/local/php7.0/bin/php /home/siteName/www/bin/console app:verify-campaign

in the cron editor of ovh i gave this configuration : enter image description here

I know OVH find my script because i have this information in the cron log :

[2017-06-17 04:38:01] ## OVH ## START - 2017-06-17 04:38:01.601227 executing: /homez.76/siteNamesrd/./www/cron/verifyCampaign.sh 
[2017-06-17 04:38:01] ## OVH ## ERROR command '/homez.76/siteNamesrd/./www/cron/verifyCampaign.sh' must be executable
[2017-06-17 04:38:01] 
[2017-06-17 04:38:01] ## OVH ## END - 2017-06-17 02:38:01.725728 exitcode: 255

But why it is telling me this error ? When i try my command in the console online it's working well

1 answer

  • answered 2017-06-17 18:43 gview

    It's telling you that the script does not have the execute bit set allowing the cron user who is running it to execute it. You would need to use chmod to do that. This might be overkill but:

    chmod ugo+x verifyCampaign.sh

    Will certainly take care of it.