Re: [OT] Dilemma about OS <-> Postgres interaction

From: Rory Campbell-Lange <rory(at)campbell-lange(dot)net>
To: Edmund Bacon <ebacon(at)onesystem(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [OT] Dilemma about OS <-> Postgres interaction
Date: 2004-06-17 23:25:37
Message-ID: 20040617232536.GB17879@campbell-lange.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 17/06/04, Edmund Bacon (ebacon(at)onesystem(dot)com) wrote:
> Rory Campbell-Lange wrote:
>
> > I am in a dilemma about how best to pick up these messages and send them
> > on to the message sending systems. At present I have looping perl
> > scripts which have a permanent database connection, which I run through
> > screen sessions on my server. Rather embarassingly whenever I upgrade my
> > application code (reload the database and export the latest CVS code) or
> > upgrade Postgres, my looping scripts die.

> Assuming you are on a unix of some sort, Two possible solutions come
> immediately to mind.
>
> 1) Fire off a non-looping version of your perl scrip from crontab
>
> 2) Run your looping perl script from the inittab.
>
> the crontab solution would be my preference: it's easier to set up the job
> to run under a user other than root, and you can tailor when your script
> runs (say every 5 minutes between 8:00 AM and 6:00 PM Monday to Friday).

I should have mentioned that we need the messages sent very soon after
they have landed in the 'inbox'; otherwise cron would definitely be the
way to go -- including an @reboot line.

Thanks for the suggestion, though.
Rory

--
Rory Campbell-Lange
<rory(at)campbell-lange(dot)net>
<www.campbell-lange.net>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Josh Berkus 2004-06-17 23:45:51 Re: SCO embraces MySQL
Previous Message Joshua D. Drake 2004-06-17 22:53:31 Re: [OT] Dilemma about OS <-> Postgres interaction