Re: scheduled tasks
| From: | Michael Sims | Date: | Sat, 16 Feb 2002 14:59:02 +0000 |
| Subject: | Re: scheduled tasks | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-85040@lists.php.net to get a copy of this message | ||
At 06:41 AM 2/16/2002 -0800, flume33@yahoo.com wrote:
"Is currently anyway of doing scheduled tasks with PHP (without using crontab)? " "What's wrong with using cron?" I'm building an OSS site where the PostgreSQL data base maintenance, email sending, stats gathering, number crunching and graph plotting needs to be automated. My target audience will need things as simple as possible. I am under the impression that it would be a hassle and cost more to get a web host to install a cron script for Postgres. (Or have php as an executable binary instead of shared object.)If the web host gives you access to a shell account then you could setup the script...you wouldn't need them to do it. You could build a copy of PHP as an executable in your home directory and run it from there, no need to get the host to do it. Or there are a few ways that you could schedule the task remotely...use a cron job from another server that either runs the PHP script locally, connecting to the SQL database remotely, or you can use a cron job and lynx to call a remote PHP page that will run your script. Of course, this requires your script to be in your web servers directory tree, but if security is a concern you could always setup a .htaccess file to challenge for credentials then use the "-auth" switch to lynx in your remote script. It's not the most secure thing in the world, but it's better than nothing...