Loading Web pages with Cron Jobs

Discussion in 'HTML' started by smallfrythetall@gmail.com, Sep 18, 2006.

  1. Guest

    Ok, I run a online browser based game, and I need to do nightly resets
    (revives everybody and some other things) and they only think I have
    for that is Cron jobs. I wrote a .php file that updates my database
    when loaded. need to get it to load automaticly...any help?
     
    , Sep 18, 2006
    #1
    1. Advertising

  2. Hello,

    wrote:

    > Ok, I run a online browser based game, and I need to do nightly resets
    > (revives everybody and some other things) and they only think I have
    > for that is Cron jobs. I wrote a .php file that updates my database
    > when loaded. need to get it to load automaticly...any help?


    If you have full (SSH) access to the (Linux/UNIX) server, you can use the
    CGI version of PHP to run the script directly, something like a file

    #!/bin/sh
    /usr/bin/php /path/to/script.php

    in /etc/cron.daily/
    'man cron' will give you more details for your specific system.

    The script should then either be password protected (so other people cannot
    run it) or be outside of the document root.

    If your access to the server is limited (e.g. shared host), you might have
    some kind of (web)interface to setup cron jobs (this depends on your
    hoster).

    If the CGI version of PHP is not available, you could also use wget/lynx/...
    to run the script on the webserver, e.g.:

    wget http://LOGIN:/path/to/script.php

    This will also work, if you cannot setup cronjobs on the webserver itself,
    but on a machine at home/office/...

    If you are talking about Windows systems... Sorry, cannot help you then.


    Greetings

    --
    Benjamin Niemann
    Email: pink at odahoda dot de
    WWW: http://pink.odahoda.de/
     
    Benjamin Niemann, Sep 18, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mr. T

    Timer vs. Cron Jobs

    Mr. T, Jun 9, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    745
    Hans Kesting
    Jun 9, 2004
  2. Fazer

    Python and cron jobs.

    Fazer, Aug 4, 2003, in forum: Python
    Replies:
    8
    Views:
    881
    Christos TZOTZIOY Georgiou
    Aug 7, 2003
  3. hardikh2000

    JOBs............JOBs............JOBs

    hardikh2000, Aug 16, 2005, in forum: Python
    Replies:
    0
    Views:
    437
    hardikh2000
    Aug 16, 2005
  4. brad
    Replies:
    1
    Views:
    275
    Will Maier
    Aug 7, 2007
  5. coldfire
    Replies:
    3
    Views:
    274
    Michael Ströder
    Sep 7, 2012
Loading...

Share This Page