@Darian: Yeah, bake tasks we'll look at giving bake tasks some hooks
into the framework, so you can call your controllers from CLI.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Cake PHP group.
To post to this
@Darian: Yeah, bake tasks we'll look at giving bake tasks some hooks
into the framework, so you can call your controllers from CLI.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Cake PHP group.
To post to this
your knowledge.
BAKE ON!
-Mensaje original-
De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
de nate
Enviado el: Viernes, 01 de Diciembre de 2006 02:05 p.m.
Para: Cake PHP
Asunto: Re: Running CakePHP Apps As CLI Apps
@Darian: Yeah, bake tasks we'll look at giving bake
I've been using Felix's awesome Google Analytics model to create some
reports on the forum sites my employer owns. However, I'm wondering
if it's even possible to create a CakePHP app that can be run as a CLI
app as a cron job...
Any thoughts on how to accomplish this?
--
Chris Hartjes
The
Simply write a script that takes the command line arguments set's them
as $_POST or $_GET variables and also sets a $_GET['url'] value. Then
let this script include the /app/webroot/index.php and everything should
work as usual.
-- Felix
--
http://www.thinkingphp.org
I made a cli.php which is essentially the same thing as index.php but
takes the url from the passed args at the command line. I need to fix
the bin cause something is wrong with the newlines not be honored. Stop
by IRC if you need it soone rather than later, otherwise I will post a
link in the
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Chris,
This is certainly possible.
The simplest way is actually outlined on Felix's site:
http://www.thinkingphp.org/2006/08/15/the-ultimate-cakephp-bootstrap-technique/
Based on what Felix describes in that post, I typically do the following:
I guess my question is this: how do I fire off a controller/action
pair via a CLI script?
This should fire the PostsController::index action:
/app/webroot/cli.php
---
$_GET['url'] = '/posts/index';
require_once('index.php');
Hey gwoo... Is this cli.php going to ship builtin with Cake? Cool. I'll wait
for your link.
-MI
---
Remember, smart coders answer ten questions for every question they ask.
So be smart, be cool, and share your knowledge.
We kinda have Bake Tasks for that. Maybe there'll be some hooks into
the core and the dispatcher.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Cake PHP group.
To post to this group, send email to
Asunto: Re: Running CakePHP Apps As CLI Apps
We kinda have Bake Tasks for that. Maybe there'll be some hooks into
the core and the dispatcher.
__ Información de NOD32, revisión 1893 (20061130) __
Este mensaje ha sido analizado con NOD32 antivirus system
http://www.nod32.com
On 11/30/06, gwoo [EMAIL PROTECTED] wrote:
I made a cli.php which is essentially the same thing as index.php but
takes the url from the passed args at the command line. I need to fix
the bin cause something is wrong with the newlines not be honored. Stop
by IRC if you need it soone rather
I guess they could be used with cron, but CLI utilities is exactly what
Bake Tasks are for.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Cake PHP group.
To post to this group, send email to
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
nate wrote:
I guess they could be used with cron, but CLI utilities is exactly what
Bake Tasks are for.
Interesting, so a Bake task would take the place of the example that I
submitted in this thread?
- --
Darian Anthony Patrick [EMAIL
@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre
de gwoo
Enviado el: Jueves, 30 de Noviembre de 2006 05:25 p.m.
Para: Cake PHP
Asunto: Re: Running CakePHP Apps As CLI Apps
here is the promised link. http://bin.cakephp.org/saved/879
it should look very familiar as its a near mirror image of index.php
15 matches
Mail list logo