Run a PHP script in background of a Site in every 10 Seconds

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • rahismailbox@gmail.com

    Run a PHP script in background of a Site in every 10 Seconds

    I need to run a script in every 10 seconds in background of the site
    of 10-15 php pages.
    So how do i activate that script?
    Is there a code to be embedded in every php page so that the script
    got run after every 10 seconds.

    I need not to monitor that script.
    This script will make some comparisions and then make changes in the
    database.
    Please reply as this is very neccesary for completion of my project.

    Regards
    Rahi Jain
  • Betikci Boris

    #2
    Re: Run a PHP script in background of a Site in every 10 Seconds

    On Feb 17, 3:29 pm, "rahismail...@g mail.com" <rahismail...@g mail.com>
    wrote:
    I need to run a script in every 10 seconds in background of the site
    of 10-15 php pages.
    So how do i activate that script?
    Is there a code to be embedded in every php page so that the script
    got run after every 10 seconds.
    >
    I need not to monitor that script.
    This script will make some comparisions and then make changes in the
    database.
    Please reply as this is very neccesary for completion of my project.
    >
    Regards
    Rahi Jain
    its not about php use this html code -<meta http-equiv='refresh'
    content='10'>

    Comment

    • rahismailbox@gmail.com

      #3
      Re: Run a PHP script in background of a Site in every 10 Seconds

      On Feb 18, 3:43 pm, Betikci Boris <pard...@gmail. comwrote:
      On Feb 17, 3:29 pm, "rahismail...@g mail.com" <rahismail...@g mail.com>
      wrote:
      >
      I need to run a script in every 10 seconds in background of the site
      of 10-15 php pages.
      So how do i activate that script?
      Is there a code to be embedded in every php page so that the script
      got run after every 10 seconds.
      >
      I need not to monitor that script.
      This script will make some comparisions and then make changes in the
      database.
      Please reply as this is very neccesary for completion of my project.
      >
      Regards
      Rahi Jain
      >
      its not about php use this html code -<meta http-equiv='refresh'
      content='10'>
      I think it will work but i need script to be run in back ground.
      This way i have to keep that page open all the time during the trading
      hours ( Privately on one node).
      if any other solution didnt show up i have to use this code and
      method.
      Regards
      Rahi

      Comment

      • Jerry Stuckle

        #4
        Re: Run a PHP script in background of a Site in every 10 Seconds

        rahismailbox@gm ail.com wrote:
        On Feb 18, 3:43 pm, Betikci Boris <pard...@gmail. comwrote:
        >On Feb 17, 3:29 pm, "rahismail...@g mail.com" <rahismail...@g mail.com>
        >wrote:
        >>
        >>I need to run a script in every 10 seconds in background of the site
        >>of 10-15 php pages.
        >>So how do i activate that script?
        >>Is there a code to be embedded in every php page so that the script
        >>got run after every 10 seconds.
        >>I need not to monitor that script.
        >>This script will make some comparisions and then make changes in the
        >>database.
        >>Please reply as this is very neccesary for completion of my project.
        >>Regards
        >>Rahi Jain
        >its not about php use this html code -<meta http-equiv='refresh'
        >content='10' >
        >
        I think it will work but i need script to be run in back ground.
        This way i have to keep that page open all the time during the trading
        hours ( Privately on one node).
        if any other solution didnt show up i have to use this code and
        method.
        Regards
        Rahi
        >
        Which suffers from the problems I described above...

        --
        =============== ===
        Remove the "x" from my email address
        Jerry Stuckle
        JDS Computer Training Corp.
        jstucklex@attgl obal.net
        =============== ===

        Comment

        • Betikci Boris

          #5
          Re: Run a PHP script in background of a Site in every 10 Seconds

          On Feb 18, 1:00 pm, "rahismail...@g mail.com" <rahismail...@g mail.com>
          wrote:
          On Feb 18, 3:43 pm, Betikci Boris <pard...@gmail. comwrote:
          >
          >
          >
          On Feb 17, 3:29 pm, "rahismail...@g mail.com" <rahismail...@g mail.com>
          wrote:
          >
          I need to run a script in every 10 seconds in background of the site
          of 10-15 php pages.
          So how do i activate that script?
          Is there a code to be embedded in every php page so that the script
          got run after every 10 seconds.
          >
          I need not to monitor that script.
          This script will make some comparisions and then make changes in the
          database.
          Please reply as this is very neccesary for completion of my project.
          >
          Regards
          Rahi Jain
          >
          its not about php use this html code -<meta http-equiv='refresh'
          content='10'>
          >
          I think it will work but i need script to be run in back ground.
          This way i have to keep that page open all the time during the trading
          hours ( Privately on one node).
          if any other solution didnt show up i have to use this code and
          method.
          Regards
          Rahi
          Or you can embed a peforming script to dense used page in general..

          Comment

          • Tony

            #6
            Re: Run a PHP script in background of a Site in every 10 Seconds

            rahismailbox@gm ail.com wrote:
            On Feb 18, 3:43 pm, Betikci Boris <pard...@gmail. comwrote:
            >On Feb 17, 3:29 pm, "rahismail...@g mail.com" <rahismail...@g mail.com>
            >wrote:
            >>
            >>I need to run a script in every 10 seconds in background of the site
            >>of 10-15 php pages.
            >>So how do i activate that script?
            >>Is there a code to be embedded in every php page so that the script
            >>got run after every 10 seconds.
            >>I need not to monitor that script.
            >>This script will make some comparisions and then make changes in the
            >>database.
            >>Please reply as this is very neccesary for completion of my project.
            >>Regards
            >>Rahi Jain
            >its not about php use this html code -<meta http-equiv='refresh'
            >content='10' >
            >
            I think it will work but i need script to be run in back ground.
            This way i have to keep that page open all the time during the trading
            hours ( Privately on one node).
            if any other solution didnt show up i have to use this code and
            method.
            Regards
            Rahi
            Use Ajax, and use setTimeout in the javascript.

            Comment

            • radmission05@gmail.com

              #7
              Re: Run a PHP script in background of a Site in every 10 Seconds

              On Feb 17, 5:29 am, "rahismail...@g mail.com" <rahismail...@g mail.com>
              wrote:
              I need to run a script in every 10 seconds in background of the site
              of 10-15 php pages.
              So how do i activate that script?
              Is there a code to be embedded in every php page so that the script
              got run after every 10 seconds.
              >
              I need not to monitor that script.
              This script will make some comparisions and then make changes in the
              database.
              Please reply as this is very neccesary for completion of my project.
              >
              Regards
              Rahi Jain
              I agree with Stuckle, use "cron (Linux/Unix) or scheduled task
              (Windows). "
              to schedule the the execution on php scripts.. you can set when it
              should run.
              how often.. etc.. but the fact is, you really need dedicated server..
              and some vps offers
              this service too.. you can setup cron by CPANEL or root(SSH), but i
              dont know with plesk..

              but if really dont have such root access on your server, there is
              another way..
              you only need a dedicated computer on your side.. 24/7 open.. only
              need a desktop application
              that manipulate your data remotely, is easy to remotely manipulate the
              mysql (just allow your computer IP) you can make a desktop application
              that can act also a php script, the same function, and process..
              program it to repeat every 10 seconds.. (the problem is the speed of
              the internet)

              or a desktop application that call a hidden php script from the server
              every 10 seconds..
              each call, php perform such task..

              Comment

              • rahismailbox@gmail.com

                #8
                Re: Run a PHP script in background of a Site in every 10 Seconds

                On Feb 19, 1:29 pm, "radmissio...@g mail.com" <radmissio...@g mail.com>
                wrote:
                On Feb 17, 5:29 am, "rahismail...@g mail.com" <rahismail...@g mail.com>
                wrote:
                >
                I need to run a script in every 10 seconds in background of the site
                of 10-15 php pages.
                So how do i activate that script?
                Is there a code to be embedded in every php page so that the script
                got run after every 10 seconds.
                >
                I need not to monitor that script.
                This script will make some comparisions and then make changes in the
                database.
                Please reply as this is very neccesary for completion of my project.
                >
                Regards
                Rahi Jain
                >
                I agree with Stuckle, use "cron (Linux/Unix) or scheduled task
                (Windows). "
                to schedule the the execution on php scripts.. you can set when it
                should run.
                how often.. etc.. but the fact is, you really need dedicated server..
                and some vps offers
                this service too.. you can setup cron by CPANEL or root(SSH), but i
                dont know with plesk..
                >
                but if really dont have such root access on your server, there is
                another way..
                you only need a dedicated computer on your side.. 24/7 open.. only
                need a desktop application
                that manipulate your data remotely, is easy to remotely manipulate the
                mysql (just allow your computer IP) you can make a desktop application
                that can act also a php script, the same function, and process..
                program it to repeat every 10 seconds.. (the problem is the speed of
                the internet)
                >
                or a desktop application that call a hidden php script from the server
                every 10 seconds..
                each call, php perform such task..
                Jerry is right as always.
                Yes i will be using cron to solve this problem.
                I dont have a dedicated server but it has Cpanel(So i can apply cron
                feature).

                Comment

                Working...