tags:

views:

422

answers:

3

I need to call a Kohana helper (or any php MVC framework) from a Cron job.
How can I do this?
The server is Linux, so, I can only think of two possible solutions:
1- Open an URL from the cron job, which hits a controller and does what it has to do.
2- Call a Kohana controller without passing through the web server, but with the PHP CLI. (is that even possible? I don't think so, it might need the web server environment to work)

Know a solution? Thanks

+1  A: 

Can't you just curl or wget the URL?

Paul Tomblin
+5  A: 

with the kohana framework you can pass the "uri" as a command line parameter:

/path/to/index.php controller/method/param

you might want to try that, you will definitely need a controller but you dont need to use wget or curl

Nodren