[Feature Request] Add a function to stop a running job
- Dominant language
- C
- Stars
- 3.9k
- Forks
- 260
- Avg merge
- 5d 5h
- Merged PRs (30d)
- 1
Description
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
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the requested cron.stop(job_id/job_name) behavior alongside the existing cron.unschedule behavior and related issue #178. Clarify whether stopping should cancel or terminate the PostgreSQL backend, how a force option should work, and whether unscheduling a running job should also stop it; done means the API and both behaviors are specified and implemented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, postgresql
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100