Welcome Guest, Not a member yet? Register   Sign In
Run external program in background
#8

[eluser]TheFuzzy0ne[/eluser]
Another possible solution may be to run a PHP script using exec(). For example php -f myfile.php, which can run pretty much in an infinite loop (as long as there are files to encode). You can use a file, or a database to store the number of processes going on, and a file queue so your calling script will execute the encoding script, and it will either start encoding if there aren't many others being encoded, or it can wait in a queue until you have the resources to do it.

It's a very simplistic idea, but unfortunately it's the best a mind as inferior as mine can come up with (for now, anyway).

I've searched online for a solution, and I've found others emulating multi-thread applications, but they all seem to have serious flaws or limits.


Messages In This Thread
Run external program in background - by El Forum - 04-30-2008, 09:55 AM
Run external program in background - by El Forum - 04-30-2008, 10:05 AM
Run external program in background - by El Forum - 04-30-2008, 10:55 AM
Run external program in background - by El Forum - 04-30-2008, 11:34 AM
Run external program in background - by El Forum - 04-30-2008, 12:25 PM
Run external program in background - by El Forum - 04-30-2008, 12:47 PM
Run external program in background - by El Forum - 04-30-2008, 12:49 PM
Run external program in background - by El Forum - 04-30-2008, 12:57 PM
Run external program in background - by El Forum - 04-30-2008, 01:10 PM
Run external program in background - by El Forum - 04-30-2008, 01:16 PM
Run external program in background - by El Forum - 04-30-2008, 01:32 PM
Run external program in background - by El Forum - 04-30-2008, 04:17 PM
Run external program in background - by El Forum - 05-01-2008, 02:54 AM
Run external program in background - by El Forum - 05-01-2008, 05:36 AM



Theme © iAndrew 2016 - Forum software by © MyBB