views:

110

answers:

2

Hi,

I'm using CodeIgniter (a PHP framework) to build an app, and I have an every-minute job to run with the program, 24 hours a day. I currently have it set up as:

example.com/controller/runthis

and that executes the job I want, but cron doesn't visit the URL as a user, it executes a script as far as I know. Do I just write a script that calls that URL/function wuth cURL? My concern is that I'm adding more complexity this way than I'm avoiding by using the framework. Does anyone have suggestions for a case like this? And is there an obvious solution I've overlooked?

+3  A: 

You could just load it with wget or lynx.

Greg
A: 

Assuming the script is not doing anything requiring the web server, you could use php-cli to run it from a bash script.

Myles