[aidan] feat/task-scheduling: add hourly and minute (15-min minimum) schedule intervals (#93)

This commit is contained in:
Aidan
2026-06-16 23:50:52 -07:00
committed by GitHub
parent 11bbabd0ed
commit e84eceee5b
11 changed files with 173 additions and 27 deletions
@@ -263,6 +263,8 @@ function describeSchedule(workflow: Workflow): string {
const h12 = ((s.hour + 11) % 12) + 1;
const ampm = s.hour < 12 ? 'am' : 'pm';
const time = s.minute === 0 ? `${h12}${ampm}` : `${h12}:${String(s.minute).padStart(2, '0')}${ampm}`;
if (s.repeat_unit === 'minute') return `Every ${s.repeat_every} minutes`;
if (s.repeat_unit === 'hour') return s.repeat_every === 1 ? `Hourly at :${String(s.minute).padStart(2, '0')}` : `Every ${s.repeat_every} hours`;
if (s.repeat_unit === 'day') return s.repeat_every === 1 ? `Daily at ${time}` : `Every ${s.repeat_every} days at ${time}`;
if (s.repeat_unit === 'month') return s.repeat_every === 1 ? `Monthly at ${time}` : `Every ${s.repeat_every} months at ${time}`;
if (s.on_days.length === 5 && [1,2,3,4,5].every((d) => s.on_days.includes(d))) return `Weekdays at ${time}`;