Welcome Guest, Not a member yet? Register   Sign In
Allowing Cron to Run a controller/function but not a standard user
#1

[eluser]Eric Cope[/eluser]
I need to run a portion of my code with a cron - only a cron. I do not want it to be ran by users. Any idea how to prevent users from running a controller function, but allowing cron?
#2

[eluser]Jilani Jidni[/eluser]
[quote author="Eric Cope" date="1218194812"]I need to run a portion of my code with a cron - only a cron. I do not want it to be ran by users. Any idea how to prevent users from running a controller function, but allowing cron?[/quote]

Use hash (encrypted) code to do this what a user won't know.
#3

[eluser]drewbee[/eluser]
I never put cron ran scripts outside of public directories, so its never really been an issue.

Though with CI, I do my own connections to the databases and like, and completely opt out of anything code igniter (since it usually is pure scripting anyways).

This is my usual structure.

/public_html/
/system/application
/cron/
#4

[eluser]Eric Cope[/eluser]
I was hoping to take advantage of the models I have already created...
If I use a new index.php file in cron, and I set a global variable there, that might work...




Theme © iAndrew 2016 - Forum software by © MyBB