@gguf/claw
Version:
Multi-channel AI gateway with extensible messaging integrations
44 lines (43 loc) • 1.49 kB
TypeScript
import type { CronJobCreate, CronJobPatch } from "../types.js";
import type { CronServiceState } from "./state.js";
export declare function start(state: CronServiceState): Promise<void>;
export declare function stop(state: CronServiceState): void;
export declare function status(state: CronServiceState): Promise<{
enabled: boolean;
storePath: string;
jobs: number;
nextWakeAtMs: number | null;
}>;
export declare function list(state: CronServiceState, opts?: {
includeDisabled?: boolean;
}): Promise<import("../types.js").CronJob[]>;
export declare function add(state: CronServiceState, input: CronJobCreate): Promise<import("../types.js").CronJob>;
export declare function update(state: CronServiceState, id: string, patch: CronJobPatch): Promise<import("../types.js").CronJob>;
export declare function remove(state: CronServiceState, id: string): Promise<{
readonly ok: false;
readonly removed: false;
} | {
readonly ok: true;
readonly removed: boolean;
}>;
export declare function run(state: CronServiceState, id: string, mode?: "due" | "force"): Promise<{
ok: boolean;
ran: boolean;
reason: "already-running";
} | {
ok: boolean;
ran: boolean;
reason: "not-due";
} | {
readonly ok: true;
readonly ran: true;
reason?: undefined;
}>;
export declare function wakeNow(state: CronServiceState, opts: {
mode: "now" | "next-heartbeat";
text: string;
}): {
readonly ok: false;
} | {
readonly ok: true;
};