I search in the internet about this issue. But couldn't find a proper answer. This link is bit closer to the solution, but it is not worked for me.
I scheduled a job in pgadmin. but the job is always got failed due to "couldn't get a connection to the database" error. When creating a job using PGAdmin, initially it is asked name, job class, host agent etc... In first stage I left blank for the field "Host Agent". (My schedule works in every minute) PGAdmin right side panel has a tab called "Statistics". Minute by minute it is updated as "failed".
Then i changed host agent to postgres. (login user)
Still the job is not working properly. (even failed status also not logged after changing host agent) Step has a simple insert query. Query does not have an issue.
Anyone can show me a direction for doing this?