Running a PHP script in unix background

Discussion in 'PHP' started by tamilsoft, Feb 14, 2008.

  1. #1
    Hi,
    I am new to unix, I am going to run a PHP script in the background by using the following shell command,
    exec("/usr/bin/php path/to/script.php >/dev/null &");
    PHP:
    What my doubt is:

    1]How many times the script.php will be executed? [will it execute repeatedly or once]
    2]Should I stop this script after completion of my job?

    Thanks in advance
    tamilsoft
     
    tamilsoft, Feb 14, 2008 IP
  2. abdussamad

    abdussamad Active Member

    Messages:
    543
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    60
    #2
    1. Once
    2. yes
     
    abdussamad, Feb 15, 2008 IP