How to schedule Symfony tasks Print

  • 30

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 symfony command, just as the cron sees it.

php /var/www/vhosts/ my:task

Make sure you clear the app cache before running the task.

Was this answer helpful?

« Back