- The UI must have the ability to override (skip) the next scheduled shutdown without modifying the schedule itself.
- The GitHub Actions must provide a workflow dispatch or endpoint that:
- Accepts a request from the UI to override the next scheduled shutdown.
- Ensures the scheduled shutdown does not execute for the upcoming window (but does not affect future scheduled shutdowns).
- Optionally, clears the override after the scheduled shutdown time has passed (so future shutdowns happen as normal).
- Returns confirmation of the override action.
- The UI must have the ability to request a manual startup of the cluster if the cluster is currently stopped (i.e., during the scheduled shutdown window).
- The GitHub Actions must provide a workflow dispatch or endpoint that:
- Accepts a startup request from the UI.
- Validates that the request is allowed (e.g., cluster is currently stopped, and it is during the scheduled shutdown period).
- Returns an error if the request is not allowed (e.g., cluster is already running, or not in a valid window).
- The UI must have the ability to request a manual shutdown of the cluster, but only during the scheduled shutdown window (i.e., after the scheduled shutdown time and before the next scheduled startup).
- The GitHub Actions must provide a workflow dispatch or endpoint that:
- Accepts a shutdown request from the UI.
- Validates that the request is within the shutdown window.
- Returns an error if the request is outside the allowed window.
- The GitHub Actions must make the current shutdown and startup cron expressions available for the UI to read.
- These cron expressions must be accessible via at least one of the following:
- A configuration file in the repository (e.g.,
cluster-schedule.json
orconfig.yaml
) - An action variable or output parameter from a workflow
- A workflow dispatch (API-triggered) that returns a JSON payload containing the cron expressions
- A configuration file in the repository (e.g.,
The UI uses these cron expressions to:
- Calculate and display to the user when the next scheduled shutdown or startup will occur.
- Determine when to enable or disable shutdown/startup-related actions in the interface.
- Ensure accurate, up-to-date reflection of the underlying schedule without requiring manual UI code changes if the schedule is updated.
Example output:
{
"shutdownCron": "0 20 * * 5",
"startupCron": "0 7 * * 1"
}
- Allow the UI to override (skip) the next scheduled shutdown, without changing the overall schedule.
- Allow the UI to request a manual shutdown, but only during the scheduled shutdown window.
- Allow the UI to request a manual startup, but only when the cluster is stopped (during scheduled downtime).
- Expose shutdown and startup cron expressions in a way the UI can read (via config file, action variable, or JSON workflow output), because the UI needs these values to accurately control scheduling-related features.