A routine's life: due, run, report

A routine's life: due, run, report A lifecycle diagram generated by Archify. 01 / Cycle 02 / Recovery 03 / End Created · routine create · Cycle · first run due 01 Created routine create first run due Due · interval or commit · Cycle · in poll + context 02 Due interval or commit in poll + context Running · routine start · Cycle · 1 h lease 03 Running routine start 1 h lease Reported · routine done · Cycle · outcome 04 Reported routine done outcome ok · last result kept · Cycle · run history 05 ok last result kept run history Abandoned · lease expired · Recovery · frees itself Abandoned lease expired frees itself issues / failed · warning to all · Recovery · stays scheduled issues / failed warning to all stays scheduled Retired · routine retire · End · terminal Retired routine retire terminal taken again next run next interval or commit Legend start active state decision terminal success failure / exit neutral

Schedule

  • • --every 30m | 6h | 1d | 2w, and/or --on-commit --path src/
  • • pause / resume keep the commits missed meanwhile

One runner

  • • routine start takes a one-hour lease; others see running: <name>
  • • The server keeps schedule and lease, never runs anything