How do I schedule Symfony2 commands on shared hosting?

The cron task runs in a different environment that the shell access does, and this might provoke an error related to the project paths. This is why you have to set the full path for the Symfony2 console script, just as the cron sees it. php /var/www/vhosts/example.com/symfony_projects/myProject/app/console my:command

Related Articles

Cannot connect to MySQL when running Symfony2 commands
Cannot run Symfony2 commands: permission denied