Cron Jobs

I tried this cron setting

Code:
php mypath/app/console mautic:campaign:trigger —env=prod

I get the following error:

1/1 ClassNotFoundException: Attempted to load class "TwigBundle" from namespace "SymfonyBundleTwigBundle" in mypath/app/AppKernel.php line 168. Do you need to "use" it from another namespace?

in mypath/app/AppKernel.php line 168

I tried this cron setting

php mypath/app/console mautic:campaign:trigger —env=prod

I get the following error:

1/1 ClassNotFoundException: Attempted to load class “TwigBundle” from namespace “SymfonyBundleTwigBundle” in mypath/app/AppKernel.php line 168. Do you need to “use” it from another namespace?

in mypath/app/AppKernel.php line 168

You need to use two dashes on the env param for that to work. Symfony defaults to the dev environment on command line and we aren’t shipping those dependencies in the installable package.

php mypath/app/console mautic:campaign:trigger --env=prod

Thanks for your reply, You right but I noticed that from copy and pasting.
I realised from chatting to Alan that I only need it when I am queueing large volumes of emails.

@mbabker, yea I’m not sure why his was getting into the dev environment. I looked at his cronjob and it looked okay. Definitely something funky going on with it that I couldn’t immediately determine when we decided it wasn’t needed anyway.

Thanks,
Alan

thanks Alan