Re: Running a PHP script at a specified time
| From: | Ime Smits | Date: | Sun, 26 Mar 2000 14:58:18 +0000 |
| Subject: | Re: Running a PHP script at a specified time | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-17242@lists.php.net to get a copy of this message | ||
Jan De Luyck <jandeluyck@gmx.net> wrote in message
news:8bl7p9$j2i$1@www.php.net...
> Hello,
> Is it possible with a certain script, to let php execute functions a
certain
> times?
> I would like to create a script that checks each 10 minutes if there is
new
> mail at a mail-account, and if there is, notify me using my pager.
First, check "man cron" and then add
*/10 * * * * /usr/local/bin/php /any/path/to/your/script.php
to your crontab. If you have php compiled as a module and can't execute it
from your shell, do something like this
*/10 * * * * /usr/bin/wget http://any.server/with/your/script.php
which basically does the same thing as if somebody requested your page every
10 minutes.
But if you just want to check your mail, I it's best to just use procmail
for that.
Ime