Need help now

Discussion in 'PHP' started by Balamurali, Jun 6, 2008.

  1. #1
    I have to run a page every 12 hours without using cornjobs . Is it possible?

    thanks in advance.
     
    Balamurali, Jun 6, 2008 IP
  2. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #2
    You can use cron and wget to do this. Depending on how your system is setup, you may also be able to run the php file without wget, but the wget method is generally the easiest way to do it.

    Something like (Not positive about the timing):

    
    00  1 * * 0 user wget -q http://yoursite.com/phppage.php
    
    Code (markup):
     
    jestep, Jun 6, 2008 IP
  3. Lordo

    Lordo Well-Known Member

    Messages:
    2,082
    Likes Received:
    58
    Best Answers:
    0
    Trophy Points:
    190
    #3
    Yes it is possible :)
    If you have fair traffic, include a file in your main file (index.php for example) and let the script check the time and a variable from a local file to see if the job has been carried out for the current period or not then do whatever it should do.
     
    Lordo, Jun 6, 2008 IP