Welcome Guest, Not a member yet? Register   Sign In
Where to set CI_ENV for CI methods executed via cron?
#5

(04-11-2017, 06:59 AM)spjonez Wrote: This is how I do it:

public/index.php...

Calling it:

PHP Code:
php public/index.php controller method production 
Thank you for your response!

This does in fact address the problem but is not ideal for two reasons:
1) one must specify the environment every single time one specifies a cron/cli command. My crontab is going to have a dozen commands in it, all of which would need to have this value specified.
2) edits to the index.php file can make upgrading CodeIgniter more difficult because you have to propagate these changes manually merge these changes with any made by the CI core.

Is there not one place we can specify this value that works for both cron jobs and for cli execution?
Reply


Messages In This Thread
RE: Where to set CI_ENV for CI methods executed via cron? - by sneakyimp - 04-11-2017, 07:28 AM



Theme © iAndrew 2016 - Forum software by © MyBB