[GH-ISSUE #871] API Call to check if another check (or more) is running #610

Closed
opened 2026-02-25 23:43:01 +03:00 by kerem · 1 comment
Owner

Originally created by @psyciknz on GitHub (Aug 2, 2023).
Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/871

Working on a premise that I have two backup jobs I want to offset. Check A would check healthchecks for if Check B is in a running state. And therefore not run.

Would that be possible with current API calls?

Originally created by @psyciknz on GitHub (Aug 2, 2023). Original GitHub issue: https://github.com/healthchecks/healthchecks/issues/871 Working on a premise that I have two backup jobs I want to offset. Check A would check healthchecks for if Check B is in a running state. And therefore not run. Would that be possible with current API calls?
kerem closed this issue 2026-02-25 23:43:01 +03:00
Author
Owner

@cuu508 commented on GitHub (Aug 3, 2023):

Yes, the Get a Single Check API call response contains a boolean field started which tells if the check is in a running state.

I would not recommend using Healthchecks as a locking mechanism though. Potential problems with it:

  • Reliability – if Healthchecks is down, it could prevent both Check A and Check B from running
  • Race conditions:
    • Check A checks the running state, gets green light
    • Check B checks the running state, gets green light
    • Check A sends /start signal
    • Check B sends /start signal
    • Both checks run concurrently
  • Complexity and brittleness: your system now depends on Healthchecks, instead of using it as an optional, best-effort monitoring
<!-- gh-comment-id:1663405589 --> @cuu508 commented on GitHub (Aug 3, 2023): Yes, the [Get a Single Check](https://healthchecks.io/docs/api/#get-check) API call response contains a boolean field `started` which tells if the check is in a running state. I would not recommend using Healthchecks as a locking mechanism though. Potential problems with it: * Reliability – if Healthchecks is down, it could prevent both Check A and Check B from running * Race conditions: * Check A checks the running state, gets green light * Check B checks the running state, gets green light * Check A sends `/start` signal * Check B sends `/start` signal * Both checks run concurrently * Complexity and brittleness: your system now *depends* on Healthchecks, instead of using it as an optional, best-effort monitoring
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/healthchecks#610
No description provided.