creating some periodically running scripts

Discussion in 'PHP' started by wsourabh, Jul 24, 2009.

  1. #1
    actually i am developing some game related to stock market

    in that i want to update some values periodically in database with the values stored in xml fomat whether the user is playing or not

    how can i do that
     
    wsourabh, Jul 24, 2009 IP
  2. kblessinggr

    kblessinggr Peon

    Messages:
    539
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #2
    assign a cron job to your server to run the php script at an interval (or whatever kind of script you made).
     
    kblessinggr, Jul 24, 2009 IP
  3. HivelocityDD

    HivelocityDD Peon

    Messages:
    179
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    If you are using a linux machine you can use cron for this

    Along with the time period call your script in the cron job

    You can try this using

    crontab -e in command line or using cpanel cron tasks

    Which calling php script make sure that you use your php path along with the script name

    some thing like

    /usr/bin/php -q /home/yourname/public_html/updateDB.php

    Thanks !!
     
    HivelocityDD, Jul 25, 2009 IP