Welcome Guest, Not a member yet? Register   Sign In
Scheduled scripts
#1

[eluser]frist44[/eluser]
My site is tightly integrated with a database and I have several libraries that are essential for the business logic. However, some of the functions I would like available to a scheduled task that gets runs at a particular frequency.

Is there an easy way to adapt the CodeIgniter code to be scheduled, but not through going to a browser and clicking a link or having it done through a script because my worry is that some of the scripts could take awhile and time because they would go on so long?

I don't want to have to modify my server settings just for these special cases.

Thanks!
#2

[eluser]Sarfaraz Momin[/eluser]
If the task is important and has to run at defined intervals I would not take chances and setup cron which I am sure will execute the script at regular interval and work great.

There are other ways of doing this but not really recommended. Things checking at the end of all pages if its time to execute the script and when it is time it will execute it.

There is nothing special in Codeigniter to schedule a task.

-Sarfaraz
#3

[eluser]frist44[/eluser]
I got that. My intention was never use use Codeigniter in place of Cron. I was always going to schedule a script through cron, but I was talking more about sharing code and using some of the libraries in my application and using the database access and all that, rather than having to write libraries that would be specific to the schedule scripts. I guess my question is more about using the framework that i've already created for some maintenance type scripts.
#4

[eluser]danmontgomery[/eluser]
http://codeigniter.com/wiki/CI_on_the_command_line/




Theme © iAndrew 2016 - Forum software by © MyBB