Welcome Guest, Not a member yet? Register   Sign In
Fake cron?
#17

[eluser]esra[/eluser]
Earlier, I made mention a couple of classes on phpclasses.org that I spotted some time ago and bookmarked them for future experimentation. I was at work at the time and did not have access to the bookmarks.

One is here:

http://www.phpclasses.org/browse/package/3953.html

The class description is:

Quote:This class can emulate the execution of program threads using separate HTTP requests to the same script.

It establishes an HTTP connection to the same Web server to execute the same PHP script. It sends a request passing the name a function to execute and an argument to be passed to that function.

The requested script executes some code that detects the thread execution request and calls the specified function.

When the thread request script ends, the return values of the called function is returned as a serialized string.

The calling script can execute other tasks while the thread script runs. The results may be collected later when the thread script ends.

The second is here but only runs on nix systems, but may not be a problem for some users.

http://www.phpclasses.org/browse/package/1136.html

The second solution was of no interest to me because I usually try to support all operating systems for code portability reasons. However, I found the first solution to be very interesting and very creative. What intriqued me about the first solution was that adding an event listener library to CI/Kohana might allow a controller to trigger an event to start execution of the process. The Observer design pattern was designed for this sort of thing, so a mix of the two might provide a solution. In the least, it might prove useful for generating reports in the background, generating a pdf file, or possibly performing something like a video conversion.


Messages In This Thread
Fake cron? - by El Forum - 07-24-2007, 07:48 PM
Fake cron? - by El Forum - 07-24-2007, 08:13 PM
Fake cron? - by El Forum - 07-24-2007, 08:50 PM
Fake cron? - by El Forum - 07-24-2007, 09:19 PM
Fake cron? - by El Forum - 07-25-2007, 07:42 AM
Fake cron? - by El Forum - 07-25-2007, 08:37 AM
Fake cron? - by El Forum - 07-25-2007, 09:18 AM
Fake cron? - by El Forum - 07-25-2007, 12:26 PM
Fake cron? - by El Forum - 07-25-2007, 12:31 PM
Fake cron? - by El Forum - 07-25-2007, 12:37 PM
Fake cron? - by El Forum - 07-25-2007, 02:50 PM
Fake cron? - by El Forum - 07-25-2007, 05:44 PM
Fake cron? - by El Forum - 07-27-2007, 09:25 AM
Fake cron? - by El Forum - 07-28-2007, 03:57 AM
Fake cron? - by El Forum - 07-28-2007, 08:28 AM
Fake cron? - by El Forum - 07-28-2007, 05:51 PM
Fake cron? - by El Forum - 07-28-2007, 09:07 PM



Theme © iAndrew 2016 - Forum software by © MyBB