Skip to content

GetSchedule

Source: src/AWS/Scheduler/GetSchedule.ts

Runtime binding for scheduler:GetSchedule.

Pairs with CreateSchedule for the dynamic-scheduling pattern: a deployed Lambda inspects schedules it minted at runtime (is the reminder still pending?). Optionally scoped to a ScheduleGroup; without one it covers the default group.

Check A Pending Reminder

const getSchedule = yield* AWS.Scheduler.GetSchedule();
// runtime
const schedule = yield* getSchedule({ Name: `reminder-${userId}` });
console.log(schedule.State, schedule.ScheduleExpression);

Scope Reads To A Schedule Group

const getSchedule = yield* AWS.Scheduler.GetSchedule(group);