execute background processes with exec

Discussion in 'PHP' started by yzmaster, Jul 29, 2012.

  1. #1
    I have a page wich required
    • Ability to run PHP from the command line (CLI) with exec()
    • Ability to execute background processes with exec("binary > /dev/null &")

    and i setup VPS server for it.. i enable exec() function but i`m complet newebie and i don`t know how to setup execute background processes with exec
    ("binary > /dev/null &")?
    i spend half a day trying find some manuals for it.. but i don`t find any usualy information then "ask a pro"..
    can anybody give my useful help information??

     
    yzmaster, Jul 29, 2012 IP
  2. daman371

    daman371 Peon

    Messages:
    121
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Do you need to use exec or could you do this in a cron job?
     
    daman371, Jul 29, 2012 IP
  3. sarahk

    sarahk iTamer Staff

    Messages:
    28,899
    Likes Received:
    4,555
    Best Answers:
    123
    Trophy Points:
    665
    #3
    I suspect the people who said "ask a pro" were trying to protect your server from you. It is so easy to make mistakes that have big consequences. I'd find another way around the problem which will buy you time to upskill.
     
    sarahk, Jul 29, 2012 IP
  4. Pepdeal

    Pepdeal Peon

    Messages:
    149
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    i cron job can do it
     
    Pepdeal, Jul 29, 2012 IP