I'm running Codeigniter on a Windows Web Server 2008 and need to queue and run a PHP, Imagemagick script to process hi-res images. I need help designing the best solution for this.
My current thinking is I could run Task Scheduler every 10 mins to run WGET
to make an http request to a PHP script that checks for queued jobs.
If this is a sensible solution I have the following queries:
1. If I have 100 jobs queued and each jobs runs the PHP script for about 3 minutes I can't keep looping as the script will timeout. How do I close the script and then check if there is another job to process and ensure I'm only processing 1 job at a time on the server.
2. I've checked here http://php.net/manual/en/function.set-time-limit.php
and I'm not quite clear what is the limit on Windows server. max_execution_time is not set in my php.ini but the script seems to run OK even though it 2-3 minutes.