How to use listen/notify with asp.net and Postgresql / pgAgent

1.2k Views Asked by At

I am a month “old” in Postgresql. I try to combine the listen/notify events with asp.net. But I can't find any good examples. This one was the closest I could find, http://www.codeguru.com/columns/dotnet/postgres-tricks-in-.net.html. But I still could not change it to asp.net (maybe it is my level that is too low).

What I want is to be able to:

  1. schedule an event from my webpage. Example each Sunday at 10 o'clock.
  2. When the time comes, the scheduler calls web service with 2 parameters.

If you can direct me in the right direction, it would be much appreciated.

INSTALLATION OF PG AGENT

For anyone who is searching the web about pgAgent, like I did last week, and haven't installed it before, I have a little guide here. The pgAgent is a time scheduler in Postgres, and it is pretty smart. The problem is, that the installation guides not are the best. Especially not if you are working with pgAdmin 4, like I do, and where the pgAgent is not included.

But in the end I found, that you don’t need to install the classes manually. In Windows 10 search the stackbuilder and add the pgAgent. Then you are good. The jobs will be shown in the bottom of the pgAdmin after that. I have added pics below.

enter image description here

enter image description here enter image description here

0

There are 0 best solutions below