|
Home > Archive > PostgreSQL Newbies > April 2006 > Scheduled Job at PostgreSQL
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Scheduled Job at PostgreSQL
|
|
| shakil tanvir 2006-04-07, 3:40 am |
| Hi all,
My present project requirement is to make an automatic interactivity which will check the database at pgsql on a scheduled time and email the result to an admin.
Similar functionality can be achieved in MS SQL Server as they have a stored proceure named SP_SEND_CDOSYSMAIL for sending email and SQL Server can have scheduled database job which will run the query on scheduled time.
I would like to know if similar thing can be done in PostgreqSQL, that is whether pgsql can have scheduled database job and if there any stored procedure which will send email automatically. If there is no such facility then any idea, suggestion of how t
o implement it will help a lot!
Shakil
---------------------------------
Blab-away for as little as 1¢/min. Make PC-to-Phone Calls using Yahoo! Messenger with Voice.
| |
| A. Kretschmer 2006-04-07, 3:40 am |
| am 06.04.2006, um 21:53:54 -0700 mailte shakil tanvir folgendes:
> I would like to know if similar thing can be done in PostgreqSQL, that
> is whether pgsql can have scheduled database job and if there any
> stored procedure which will send email automatically. If there is no
No.
> such facility then any idea, suggestion of how to implement it will
> help a lot!
You can use the CRON for such jobs. And you can write a sql-script with
contains your SQL-Code, executed this with psql -f <your_script> and send
email from within this shell-script.
HTH, Andreas
--
Andreas Kretschmer (Kontakt: siehe Header)
Heynitz: 035242/47215, D1: 0160/7141639
GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
=== Schollglas Unternehmensgruppe ===
---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql
.org so that your
message can get through to the mailing list cleanly
| |
| Richard Broersma Jr 2006-04-07, 3:40 am |
| In BSD/Linux systems this is strait forward. Does Windows have any features similar to a cron
daemon? I assume that DOS can be used as scripting language. :-/
Regards,
--- "A. Kretschmer" <andreas. kretschmer@schollgla
s.com> wrote:
> am 06.04.2006, um 21:53:54 -0700 mailte shakil tanvir folgendes:
>
> No.
>
>
>
> You can use the CRON for such jobs. And you can write a sql-script with
> contains your SQL-Code, executed this with psql -f <your_script> and send
> email from within this shell-script.
>
>
> HTH, Andreas
> --
> Andreas Kretschmer (Kontakt: siehe Header)
> Heynitz: 035242/47215, D1: 0160/7141639
> GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
> === Schollglas Unternehmensgruppe ===
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql
.org so that your
> message can get through to the mailing list cleanly
>
---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
| |
| Kevin Crenshaw 2006-04-07, 11:30 am |
| Richard,
In a windows environment there are a couple of different ways you could go.
1. You could write a windows service using the .net language of your choice
to poll the database and send an email for you. 2. You could write a script
to check the database and set up a scheduled task (similar to a cron job) to
run the script at a specified interval.
I'm sure there are other options available, but these two are probably the
most straight forward.
HTH,
Kevin
-----Original Message-----
From: pgsql-novice-owner@postgresql.org
[mailto:pgsql-novice-owner@postgresql.org] On Behalf Of Richard Broersma Jr
Sent: Friday, April 07, 2006 1:41 AM
To: Novice Postgresql-list
Subject: Re: [NOVICE] Scheduled Job at PostgreSQL
In BSD/Linux systems this is strait forward. Does Windows have any features
similar to a cron
daemon? I assume that DOS can be used as scripting language. :-/
Regards,
--- "A. Kretschmer" <andreas. kretschmer@schollgla
s.com> wrote:
> am 06.04.2006, um 21:53:54 -0700 mailte shakil tanvir folgendes:
>
> No.
>
>
>
> You can use the CRON for such jobs. And you can write a sql-script with
> contains your SQL-Code, executed this with psql -f <your_script> and send
> email from within this shell-script.
>
>
> HTH, Andreas
> --
> Andreas Kretschmer (Kontakt: siehe Header)
> Heynitz: 035242/47215, D1: 0160/7141639
> GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
> === Schollglas Unternehmensgruppe ===
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql
.org so that your
> message can get through to the mailing list cleanly
>
---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq
|
|
|
|
|