Received: from mail.postgresql.org (webmail.postgresql.org [216.126.85.28]) by mail.postgresql.org (8.11.1/8.11.1) with SMTP id eB44kwF62889 for ; Sun, 3 Dec 2000 23:46:58 -0500 (EST) (envelope-from pgsql-general-owner@postgresql.org) Received: from dopey.usu.edu (dopey.usu.edu [129.123.1.118]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id eARLt7t79283; Mon, 27 Nov 2000 16:55:07 -0500 (EST) (envelope-from rmello@cc.usu.edu) Received: from cc.usu.edu ("port 4081"@slxwy.dorms.usu.edu [129.123.236.160]) by cc.usu.edu (PMDF V5.2-32 #30472) with ESMTP id <01JX1EMALBJM8ZEX7Q@cc.usu.edu>; Mon, 27 Nov 2000 14:55:14 MDT Date: Mon, 27 Nov 2000 14:56:59 -0700 From: Roberto Mello Subject: Re: [SQL] a script that queries database periodically To: "Poul L. Christiansen" Cc: Bernie Huang , PHP_DB , PHP_General , PGSQL-SQL , PGSQL-GENERAL Message-id: <3A22D8AB.47A873F2@cc.usu.edu> MIME-version: 1.0 X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.16 i586) Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-Accept-Language: en, pt-BR References: <3A22B485.E8963417@ec.gc.ca> <3A22D5C7.2030502@cs.auc.dk> X-Archive-Number: 200012/64 X-Sequence-Number: 1244 "Poul L. Christiansen" wrote: > > I was thinking of writing up a PHP script and put into crontab, which is > > somehow easier than a shell script, but PHP is an apache module, so I > > cannot execute PHP under crontab (it has to be executed in a browser > > right?). I guess a shell script is necessary. So, is it possible to > > call 'psql' and returning its query result and I can use sendmail to > > email the result? Any other idea? PHP does not have a scheduling facility? AOLserver (the web/application server that powers AOL) has had such facility (and many many others for db-backed websites) since 1995. ns_schedule_proc. http://www.aolserver.com -Roberto -- Computer Science Utah State University Space Dynamics Laboratory Web Developer USU Free Software & GNU/Linux Club http://fslc.usu.edu My home page - http://www.brasileiro.net/roberto