SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    E-business guru Eirik's Avatar
    Join Date
    Nov 2000
    Location
    Oslo, Norway
    Posts
    413
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    I would like to run a PHP script regulary like one would do setting up a cron job for a Perl script. Can this be accomplished, and if so how (If cron can be used, what would be the syntax for having the script run once each day?)

    Thanks in advance !
    Sincerely,

    Eirik Johansen
    Netmaking AS

  2. #2
    AdSpeed.com Son Nguyen's Avatar
    Join Date
    Aug 2000
    Location
    Silicon Valley
    Posts
    2,241
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Several options:
    if your host have PHP compiled as an interpreter, just go ahead and put in cron: (run at midnight)
    0 0 * * * php script.php

    if not, use lynx to dump the page, like you point your browser to the script everyday
    0 0 * * * lynx -dump http://domain.com/path/script.php

    somepeple also use wget, another fetching application, I think.
    - Son Nguyen
    AdSpeed.com - Ad Serving and Ad Management Made Easy

  3. #3
    SitePoint Evangelist
    Join Date
    May 2000
    Location
    Canada
    Posts
    533
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    personally i think depending on lynx / wget is not the best solution, the first one Son stated is has less chances of "screwing up"
    cogito, ergo sum


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
  •