PHP forking help

Discussion in 'PHP' started by tamilsoft, Mar 26, 2008.

  1. #1
    Hi,

    I need help on php forking. I have the following questions:

    1] In which situation should I use php forking
    2]

    I have a script that extracts data from 300 sites, normally it would take 2 to 3 hours to finish, should I exeucte this script from a normal cron or should I use phpforking for this?

    Thanks in advance
     
    tamilsoft, Mar 26, 2008 IP
  2. jayshah

    jayshah Peon

    Messages:
    1,126
    Likes Received:
    68
    Best Answers:
    1
    Trophy Points:
    0
    #2
    Hello,

    Using CURL/WGET in a cron should be sufficient, as you can have more control over the processes directly (using screen, for example). Crons don't have a timeout feature, so they will continue until they finish or are signalled (killed).

    Jay
     
    jayshah, Mar 26, 2008 IP
  3. OfeatO

    OfeatO Active Member

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    86
    #3
    Try to use pcntl_fork.
     
    OfeatO, Mar 26, 2008 IP