SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast minus's Avatar
    Join Date
    Jan 2002
    Location
    Pittsburgh, PA, USA
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Automated Server-Script Execution

    Hello. I'd like to have a script automatically running on my server every day at a given time. I could use JSP, but I'd rather use PHP. Has anyone a hint?

  2. #2
    SitePoint Enthusiast minus's Avatar
    Join Date
    Jan 2002
    Location
    Pittsburgh, PA, USA
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Automated Server-Script Execution

    Cool guy . . .replies to himself . . .

    Originally posted by minus
    Hello. I'd like to have a script automatically running on my server every day at a given time. I could use JSP, but I'd rather use PHP. Has anyone a hint?
    Sorry for the JSP/PHP thing. I wanted to say that I have a Linux box with Oracle 8i, but would rather use MySQL.


  3. #3
    SitePoint Zealot Lamar's Avatar
    Join Date
    Sep 2001
    Location
    In a galaxy far, far away
    Posts
    120
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Minus-

    I don't know if this is exactly what you are after, but I would look into cron jobs. It can be set to run a script at a certain time everyday.

    -Lamar

  4. #4
    SitePoint Enthusiast minus's Avatar
    Join Date
    Jan 2002
    Location
    Pittsburgh, PA, USA
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, thanks a lot Lamar; seems like it is exactly what I have been looking for!

  5. #5
    ********* Callithumpian silver trophy freakysid's Avatar
    Join Date
    Jun 2000
    Location
    Sydney, Australia
    Posts
    3,798
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi - yep you want to set up a cron job as Lamar suggests. To use php for a cron job, you need to either:

    1) Have php on your server as a stand alone binary, which will be located somewhere like /usr/local/bin/php Then you can call php scripts form the shell, and thus from your cron job.

    2) Otherwise, if you only have mod_php set up on your server, then you will need to set up your cron job so that lynx (the text based standard linux web client) calls the page over http for you. Example:

    lynx http://localhost/path/to/script.php > /dev/null

  6. #6
    SitePoint Enthusiast minus's Avatar
    Join Date
    Jan 2002
    Location
    Pittsburgh, PA, USA
    Posts
    77
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile

    Thanks a lot !


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •