On 4/7/06, Olwen Williams <[EMAIL PROTECTED]> wrote: > > I do it GET with a very simple layout. > > My cron job simply runs GET full_url_here > /dev/null
I'm not a real big fan of that approach, as it makes my cron job available to anybody who might know the URL, or I have to somehow restrict in the controller, which I think muddies up the code. What I've done is take app/webroot/index.php and copied it to app/cli.php. In cli.php, I removed the dispatcher code at the bottom, and added codes that load alls of the models and defines a class that encapsulates some of the generic functionality I'll need in my cron jobs. I then create a script that includes this file, instantiates the CLI class, and does whatever it needs to do. It may be a bit of a hack, but not too bad, I think, and it keeps cron jobs out of the reach of nosey web clients. -- jason http://littlezoper.livejournal.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~----------~----~----~----~------~----~------~--~---
