[[http://stackoverflow.com/questions/7781784/setting-zend-application-env-for-command-line-scripts]] ====== Get APPLICATION_ENV on CRON ====== ===== From a terminal ===== For (linux)command-line only usage you could add following line to your ''~/.bashrc''\\ \\ ''export APPLICATION_ENV="development"''\\ Or add the line to ''/etc/profile'' to set the environment variable for all users.\\ \\ ==== For more information ==== **Howto:** Set environment variables in Windows 7\\ **Howto:** Set environment variables in Linux \\ ===== From a crontab ===== Cron uses a clean/empty environment and doesn't look at ''/etc/profile'' or ''~/.bashrc'' for the **APPLICATION_ENV** or other environment variables.\\ ==== Just define the environment variable inside the crontab: ==== APPLICATION_ENV=development 0 0 * * * /usr/bin/php /path/to/your_script.php ==== For more information ==== [[http://www.pantz.org/software/cron/croninfo.html|Cron and Crontab usage and examples]]