Execute PHP file every 10 seconds

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Hussain Sanad
    New Member
    • Jul 2011
    • 9

    Execute PHP file every 10 seconds

    I have very basic info about Linux. I'm using Linux server 11.04 . I'm using the server as a web server to send SMS messages. I have a php page: read data from mysql and then send SMS (according to retrieved data) , this page is already done and store in www dir. I want this page is execute in the background each 10 sec. is that possible in crontab.
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    I think you ought to be able to produce a command line php script that will do the job if your page wont.

    Try running your current page in the command line php interpreter.

    Comment

    • Hussain Sanad
      New Member
      • Jul 2011
      • 9

      #3
      Banfa, thanx for your response. umm ... how I can run php page in command line php interpreter.

      Comment

      • Banfa
        Recognized Expert Expert
        • Feb 2006
        • 9067

        #4
        Something along the lines of

        $ php <ScriptFileName >

        Comment

        Working...