3 ms·
Hey all, this was a request from a developer on our platform who needed to send a webhook every day. The tl;dr: create extension if not exists pg_cron;
by kiwicopple 6y ago
Hey all, this was a request from a developer on our platform who needed to send a webhook every day. The tl;dr:
create extension if not exists pg_cron;
create extension if not exists http;
select
cron.schedule(
'webhook-every-minute',
'* * * * *',
$$
select status
from
http_post(
'https://some.site/your-url',
'{"hello": "world"}',
'application/json'
)
$$
);
This sends a POST request to a URL every minute.