Hyperlinkv0.9.0-beta.0

Daemon

Daemon.atfunctionsrc/Daemon.ts:1850
(startAt: Date): ScheduleWindow
(id: string, startAt: Date): ScheduleWindow

A point window (open-ended — no stop). The leading id is optional.

Daemon.at(startDate)            // nameless
Daemon.at("daily-2am", startDate)
schedule
Source src/Daemon.ts:185011 lines
export function at(startAt: Date): ScheduleWindow;
export function at(id: string, startAt: Date): ScheduleWindow;
export function at(idOrStartAt: string | Date, maybeStartAt?: Date): ScheduleWindow {
  if (idOrStartAt instanceof Date) {
    return { id: Option.none(), startAt: idOrStartAt, stopAt: Option.none() };
  }
  if (maybeStartAt === undefined) {
    throw new Error("Daemon.at(id, startAt): startAt is required");
  }
  return { id: toWindowId(idOrStartAt), startAt: maybeStartAt, stopAt: Option.none() };
}