mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-12 20:32:54 +00:00
gateway: add cron finished-run webhook (#14535)
* gateway: add cron finished webhook delivery * config: allow cron webhook in runtime schema * cron: require notify flag for webhook posts * ui/docs: add cron notify toggle and webhook docs * fix: harden cron webhook auth and fill notify coverage (#14535) (thanks @advaitpaliwal) --------- Co-authored-by: Tyler Yust <TYTYYUST@YAHOO.COM>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import type { CronJobCreate, CronJobPatch } from "./types.js";
|
||||
import type { CronJob, CronJobCreate, CronJobPatch } from "./types.js";
|
||||
import * as ops from "./service/ops.js";
|
||||
import { type CronServiceDeps, createCronServiceState } from "./service/state.js";
|
||||
|
||||
@@ -42,6 +42,10 @@ export class CronService {
|
||||
return await ops.run(this.state, id, mode);
|
||||
}
|
||||
|
||||
getJob(id: string): CronJob | undefined {
|
||||
return this.state.store?.jobs.find((job) => job.id === id);
|
||||
}
|
||||
|
||||
wake(opts: { mode: "now" | "next-heartbeat"; text: string }) {
|
||||
return ops.wakeNow(this.state, opts);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user