Mombu the Php Forum sponsored links

Go Back   Mombu the Php Forum > Php > Launching multiple PHP threads via Scheduled Tasks
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 20th May 03:14
brian
External User
 
Posts: 1
Default Launching multiple PHP threads via Scheduled Tasks



I've got a script that downloads files queued from a server, and it's
launched by a Windows Scheduled Task that launches every minute. My
understanding of the default behavior is that if the task is still
running a minute later when it's time to launch again, a duplicate
thread will not be launched.

The remote server administrator wants me to launch multiple threads
all day - in my mind the wrong choice, since multiple download threads
slow everyone one, but that's what he wants.

Anyone know if there's a way to make Windows Scheduled Task launch a
new thread of the PHP script, regardless of whether it's already
running?
  Reply With Quote


  sponsored links


2 20th May 06:28
nick
External User
 
Posts: 1
Default Launching multiple PHP threads via Scheduled Tasks



Your assumption is semi-correct, mostly because of your choice of language. If you would have asked about launvhing another download process, then you would be wrong.

A new _process_ *is* spawned by the Windows Scheduled Task launcher.

Here's a proof.

test.bat

start c:\php\php.exe test.php
start c:\php\php.exe test.php

test.php:

<?php
sleep(20)
print "slept 20 seconds";
?>


Double click on test.bat, you should see 'slept 20 seconds' printed
twice.
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666