pg_cron
pg_cron copied to clipboard
[Feature Request] Add a function to stop a running job
Hi,
It would be nice to have a cron.stop(job_id/job_name)
to stop a running job without unscheduling it.
I assume it is the nicer equivalent of finding the pid of the job and calling pg_cancel_backend
it (or `pg_terminate_backend if a force flag was used).
should be similar to DBMS_SCHEDULER.STOP_JOB from Oracle.
Also: I don't know if it's intended or not - but unscheduling a job using cron.unschedule
doesn't stop it if it is running. I would assume it should. maybe related to #178
Thanks
You may want to check another schedule pg_timetable. It has everything you've mentioned