I don't understand why this doesn't work, I configured the pgAgent job to send NOTIFY from the database every hour
NOTIFY
Steps
timetable
It turned out that the problem is that heroku does not support agAgent and the database is running on heroku, I finished scheduling tasks using Windows Task Scheduler - this is not the best solution, but it does the job I needed to do ...