Schedules whose next_run_at is <= now and that are enabled.
(now: Date)
| 158 | |
| 159 | /** Schedules whose next_run_at is <= now and that are enabled. */ |
| 160 | dueAsOf(now: Date): ScheduleEntry[] { |
| 161 | return this.db.prepare( |
| 162 | `SELECT * FROM schedules WHERE enabled = 1 AND next_run_at IS NOT NULL AND next_run_at <= ?`, |
| 163 | ).all(now.toISOString()) as ScheduleEntry[]; |
| 164 | } |
| 165 | |
| 166 | recordRunStart(scheduleId: string): number { |
| 167 | const r = this.db.prepare( |
no outgoing calls
no test coverage detected