I am trying to run a Yii console command from a shell script. The problem is when I execute the command directly in the command line as follows:
php -q /site/htdocs/derjon-dev/code/wwwroot/protected/yiic Mailer sendEmail
the above code is executed correctly. However, as soon as I add this line of code in a shell script, then try to execute the shell script as follows:
./sendtest.sh
I receive the following error:
Error: Unknown action: systemEmail
Usage: /site/htdocs/protected/yiic mailer <action>
Actions:
sendMail
invitationEmail
welcomeEmail
emailShare
systemEmail
Seems the systemEmail action is included in there, but when I execute from within a shell script, the system cannot seem to find this command.
Any idea what I maybe doing wrong?
Cheers!