MCPcopy Create free account
hub / github.com/Botloader/botloader / schedule

Function schedule

components/runtime/src/ts/scheduled_tasks.ts:22–32  ·  view source on GitHub ↗
(namespace: string, execute_at: Date, opts?: Omit<CreateOptions<any>, "executeAt">)

Source from the content-addressed store, hash-verified

20 * @returns The scheduled task
21 */
22 export async function schedule(namespace: string, execute_at: Date, opts?: Omit<CreateOptions<any>, "executeAt">): Promise<ScheduledTask> {
23 const task = await OpWrappers.tasks.scheduleTask({
24 pluginId: null,
25 namespace: namespace,
26 executeAt: execute_at.getTime(),
27 data: opts?.data ?? null,
28 uniqueKey: opts?.key,
29 });
30
31 return convertInternalTask(task)
32 }
33
34 export type CreateOptions<T = undefined> = {
35 executeAt: Date,

Callers

nothing calls this directly

Calls 1

convertInternalTaskFunction · 0.85

Tested by

no test coverage detected