Right on the moment this process is not a option... because the project
should end in 4 weeks... perhaps after a while i could try use this
ideia of yours...
But right now i have to find a diferent solution...
But thanks Jim... that open new horizons...
Jim Lucas escreveu:
Rodolfo De Nadai wrote:
No... it not should only run when i'm connected to it throught a web
server...
it means that when i go to specific IE page and press a button named
'Enable' the daemon should be called and start to run indefinitly,
and i'm able to close IE session and the daemon keep working as well...
That's what i mean...
Well, in that case, what you could do is have a cron job, or if on
windows some form of scheduled task, that looks for a file that
indicates that it should be running.
Then from apache, you could setup a page that has your enable button.
When submitted, it creates a file that indicates to the above
scheduled task that it needs to run.
Then, when that scheduled task starts, it looks at the file and sees
that it needs to be running, then it stays running. It checks to see
if it has a pid file already created. if it cannot find a pid file, it
creates a pid file to indicate that it is running. It checks every
once in a while to see if the file that tells it that it needs to be
running it still there, once that file goes away, it kills the pid
file and kills itself too.
Then the scheduled jobs keeps checking...
You might find that you need to do a little refinement to this
process. But, this is where I would start.
--
* Rodolfo De Nadai *
* Analista de Sistema Jr. - Desenvolvimento *
*Informática de Municípios Associados S.A.*
Seu governo mais inteligente
rodolfo.denadai@xxxxxxxxxxxxx <mailto:rodolfo.denadai@xxxxxxxxxxxxx> -
www.ima.sp.gov.br <http://www.ima.sp.gov.br/>
Fone: (19) 3739-6000 / Ramal: 1307
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php