#1
  1. No Profile Picture
    jtcourrier
    Guest
    Devshed Newbie (0 - 499 posts)
    Does someone know how to schedule a PHP script (like CFschedule with Cold Fusion for example) ?

    Is there a way with the CRON Daemon ?
  2. #2
  3. No Profile Picture
    moderator
    Guest
    Devshed Newbie (0 - 499 posts)
    Yes, there is a way you can cron PHP scripts, but you must have a program that will get web pages. fetch (for FreeBSD) is a good example, but I'm sure there are many others.

    Then in the cron tab you would use a command like this:

    /usr/bin/fetch http://www.domain.com/dir/file.php3

    With the appropriate time specified of course. Basically any program that will grab a page from the web server can be used to automate a PHP script.

    [This message has been edited by moderator (edited 08-02-99).]
  4. #3
  5. No Profile Picture
    jpenix
    Guest
    Devshed Newbie (0 - 499 posts)
    Another option is to compile PHP in CGI form, and use the PHP executable as a script interpreter.

    Start your script:

    #!/usr/local/php/php {or wherever PHP is}

    And mark it executable. Then you can call the script directly from cron.
  6. #4
  7. No Profile Picture
    jtcourrier
    Guest
    Devshed Newbie (0 - 499 posts)
    Is Fetch a text based browser like Lynx under linux ?
  8. #5
  9. No Profile Picture
    moderator
    Guest
    Devshed Newbie (0 - 499 posts)
    No, fetch is a command that comes with FreeBSD systems. fetch is not included with Linux (to the best of my knowledge), but you should be able to use any command that will grab a web page to schedule your scripts.

Similar Threads

  1. php script won't work inside "cgi-local" directory
    By Volitics in forum PHP Development
    Replies: 5
    Last Post: April 26th, 2004, 10:50 PM
  2. How to see the Memory used by a PHP script?
    By Pardall in forum PHP Development
    Replies: 4
    Last Post: February 13th, 2004, 03:54 PM
  3. Change this PHP script to use NETPBM instead of GD
    By hknight in forum Project Help Wanted
    Replies: 1
    Last Post: February 10th, 2004, 11:46 AM
  4. Replies: 1
    Last Post: February 4th, 2004, 01:39 PM
  5. Executing PHP script using crontab with PHP module
    By crazyIvan in forum PHP Development
    Replies: 0
    Last Post: January 23rd, 2004, 08:27 AM

IMN logo majestic logo threadwatch logo seochat tools logo