Web Analytics Made Easy -
StatCounter Peforming an Action Every Five Minutes - CodingForum

Announcement

Collapse
No announcement yet.

Peforming an Action Every Five Minutes

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Peforming an Action Every Five Minutes

    Heya, I've just recently moved from VB to PHP and of course I'm still learning the in and outs of a new language. (Such as the idea of putting an ';' at the end of almost every line aside from loops and conditonals)

    However, one thing that I can't seem to find documantion on is how to get time from the server. Of course I could be looking in the wrong places for it. Basicly I want some code to excute every five mintues. However, I want this code to work even if a user isn't online. I suppose kind of like the turn things at www.planetbattlegrounds.com (kind of like kings of chaos, I dispise most games of that ilk, but still...)

    I suppose the PHP or server moudle that did the time handling would have to run all the time or something. Any help on this matter would be very much apprechiated.

  • #2
    Write your code in PHP and then run it using a CRON job on Linux or a scheduled task if you're on a Windows box.
    Spookster
    CodingForum Supreme Overlord
    All Hail Spookster

    Comment


    • #3
      Of course, the easy way to do it.

      Thanks.

      Comment


      • #4
        *dusts old topic*

        sorry for pushing this up, but I felt it better than making a new topic.

        I'm on a windows box, and there's no option for 'every five mintues' on the scheulded task. The lowest it goes to is a day.

        Comment


        • #5
          Originally posted by Desinc
          *dusts old topic*

          sorry for pushing this up, but I felt it better than making a new topic.

          I'm on a windows box, and there's no option for 'every five mintues' on the scheulded task. The lowest it goes to is a day.
          Did you click on the advanced options in the scheduler?
          Spookster
          CodingForum Supreme Overlord
          All Hail Spookster

          Comment


          • #6
            I don't have the advanced tab.

            I'm running windows XP

            EDIT:-

            never mind, I got it. I was using the wizard.

            Comment


            • #7
              Sure you do. Once you've created the new task and go to it properties under the schedule tab there is a button on that panel that says advanced.

              If you don't want to use the scheduler that comes with windows you don't have to. There are plenty of other commerical and free scheduling programs available. Like this one for example

              http://downloads-zdnet.com.com/3001-2094-10261982.html
              Spookster
              CodingForum Supreme Overlord
              All Hail Spookster

              Comment

              Working...
              X