@frontal-labs/schedules
v0.0.2
Published
Frontal Schedules SDK — cron-based scheduling with local validation, run history, and manual triggers
Readme
@frontal-labs/schedules
Cron scheduling SDK for recurring jobs with local validation and run tracking.
Installation
bun add @frontal-labs/schedules @frontal-labs/coreUsage
import { FrontalClient } from "@frontal-labs/core";
import { createSchedulesClient } from "@frontal-labs/schedules";
const client = new FrontalClient({
apiKey: process.env.FRONTAL_API_KEY!,
baseUrl: process.env.FRONTAL_API_URL ?? "https://api.frontal.dev/v1",
});
const schedules = createSchedulesClient(client);
const schedule = await schedules.schedules.create({
name: "Nightly Export",
cron: "0 2 * * *",
timezone: "America/New_York",
target: { type: "pipeline", id: "ppl_export" },
});
const run = await schedules.schedules.trigger(schedule.id);Configuration
FRONTAL_API_KEY— Your Frontal API keyFRONTAL_SCHEDULES_API_URL— Custom schedules API base URL
