Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter Cron Jobs
#1

[eluser]IanMcQ[/eluser]
I am really excited about the new addition that allows you to execute CodeIgniter code from command line.

As of right now, all of my cron jobs are in horrible un-codeignited PHP code and I'm re-writing them in CodeIgniter (so many less lines!).

So let's say I go:

Code:
/usr/bin/php index.php cron this_cron_function
In this_cron_function, how can I determine whether or not this is a command line request? For example, what's from stopping a user from going to mysite.com/index.php/cron/this_cron_function and executing the entire procedure?

Is there any kind of way to determine the difference in requests? How can I ensure that the cron.php Controller can only be accessed and executed by a system command?

Thanks.
#2

[eluser]CroNiX[/eluser]
User Guide: Input. Read the very bottom Smile
#3

[eluser]IanMcQ[/eluser]
Damn. Smile I can read English.

Haha, thanks for pointing that out. I knew it must be something simple I'm missing. Thanks much.




Theme © iAndrew 2016 - Forum software by © MyBB