Here is the fix:
/bin/bash -c "FUEL_ENV=development; /usr/local/bin/php /home/net/###DIR###/oil refine TaskName 2>&1"
Question
I'm trying to setup a cron for a task to run under FuelPHP while setting the environment.
/bin/bash FUEL_ENV=development /usr/local/bin/php /home/net/###DIR###/oil refine TaskName 2>&1
However I get the following error everytime.
/bin/bash: FUEL_ENV=development: No such file or directory
I'm not an expert at setting up cron jobs but is there something I am missing here? (The task on it's own run from the command line using the same command works
La solution
Here is the fix:
/bin/bash -c "FUEL_ENV=development; /usr/local/bin/php /home/net/###DIR###/oil refine TaskName 2>&1"
Autres conseils
For a simpler command line, you can use the env
utility:
env FUEL_ENV=development /usr/local/bin/php ...