Every reason a schedule has no next run carries a stable code
The report of a trigger's next run is the only view of a schedule an operator has. A report that cannot distinguish "fine, nothing due" from "will never fire" is the diagnostic being absent exactly when it is needed.
The rule
- An absent next run, reported on its own, MUST mean only that nothing is currently due, the answer a perfectly healthy schedule gives between fires.
- Every other reason a schedule yields no next run MUST be reported with a stable code:
NO_EXPRESSIONwhere the expression is cleared,INVALID_EXPRESSIONwhere it is malformed, or well-formed but unsatisfiable. - Severity MUST NOT be flattened: an unusable timezone does not stop a trigger, since UTC is used in its place, so such a schedule MUST still report a real next run alongside the code
INVALID_TIMEZONE; an expression problem, being the more consequential of the two, MUST take its place. - A broken stored schedule is not a broken request, so the report MUST be answered with 200.
- It MUST carry the diagnosis.
What it means
A bare absent next run is not itself a diagnosis: reported alone, it is what a perfectly working schedule says between fires, so it cannot also be the answer for a schedule that will never fire at all. Any other reason for having no next run arrives as a named, stable code, not as the same silence a healthy schedule produces.
The same code comes out whether the schedule was just read back from a saved record or reached through a live report — a caller cannot be left wondering whether the wording changed because the diagnosis changed or because the read path did.
Example
A stored schedule left in advanced mode with nothing typed into the expression:
{ "mode": "advanced", "cron_expression": "", "timezone": "UTC" }"NO_EXPRESSION"The same code comes back whether that schedule is read from a saved record or reported straight from a freshly built configuration.