Run php script from batch file

Discussion in 'PHP' started by deriklogov, Jun 13, 2012.

  1. #1
    Hi,

    I need some professional opinion how to create batch file which will run php scripts in order.
    It has to run 1st script then wait until it finish and run another one.

    I know I could do that by joining those script with php , but I cant, so I need solution
    to run them in order, I was thinking about batch script

    Please help

    Thank You
     
    deriklogov, Jun 13, 2012 IP
  2. ssmm987

    ssmm987 Member

    Messages:
    180
    Likes Received:
    4
    Best Answers:
    3
    Trophy Points:
    43
    #2
    @echo start [location to php.exe] -f [location to phpscript]
    Code (markup):
     
    ssmm987, Jun 14, 2012 IP
  3. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #3
    Old DOS trick. Have the first file create a text file just before it ends. Have the second file loop, waiting to open the text file. Once it opens the text file, close the text file and unlink (delete) it. Do the same at the end of the second, beginning and end of the third, etc, files.
     
    Rukbat, Jun 15, 2012 IP