#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 1999
    Location
    New Milton, Hampshire, England
    Posts
    1
    Rep Power
    0
    Can anyone tell me how to run a set script which will be a mysql query at a certain time each day??

    Thanks in advance
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 1999
    Posts
    15
    Rep Power
    0
    use cron to start a perlscript
    that uses lwp, let it contact
    the php-script
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 1999
    Posts
    2
    Rep Power
    0
    Or you can install PHP as CGI (you can have both installed: apache module and as CGI).

    Example:
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
    #!/usr/local/bin/php -q
    <?
    // -q parameter tells php not to send http headers
    print "Hello world";
    ?>
    [/code]

    Then you could edit your Crontab list:
    crontab -e
    then write:
    30 10 * * * /home/user/myscript.php3

    Then your script will run every day on 10:30 a.m.

    Read "man crontab" for more info.

    Regards,
    Goral

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, 11:50 PM
  2. iptables changed after S10network script
    By hunt3r in forum Linux Help
    Replies: 0
    Last Post: February 11th, 2004, 04:51 AM
  3. running a script, after one script gets done running
    By sc_dan in forum Perl Programming
    Replies: 1
    Last Post: February 7th, 2004, 11:32 PM
  4. Running script without browser..
    By king_killa in forum PHP Development
    Replies: 15
    Last Post: January 27th, 2004, 03:11 PM

IMN logo majestic logo threadwatch logo seochat tools logo