When running a PHP script VIA crontab the _SERVER ENV variables will not be in scope due to script not running through your http server.
Perhaps you should set a variable in your PHP.ini file on your dev machine and have your Task check to see if it is on your DEV machine by doing an ini_get and checking the variable. On Feb 5, 9:07 am, DigitalDude <[email protected]> wrote: > Hey, > > for a specific cronjob I need to determine on which Server I am. > Normally I do this by the bootstrap where the Server Variable is > checked and configurations like > > Configure::write('NON_SSL_HOST', 'http://www.domain.com'). > > But with Configure::read(...) I cannot get these entries from within a > shell. I think that is because Cake is not really running when a shell > is called, and the shell has no idea about the current domain the app > is running on. > > Is there any other way to determine this? Should I maybe check the > directory where the shell is in and determine the domain from it? > > I need this to specify some data in the shell, so that for example on > the DEV version of my App (not live) emails are sent out to a dev- > email and not to all current users (so I can see if the output is > correct etc. before I deploy my code on the live domain). > > Any help would be appreciated :) > > Regards, > > DD -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
