MCPcopy
hub / github.com/node-cron/node-cron / runAsync

Function runAsync

src/scheduler/runner.ts:304–310  ·  view source on GitHub ↗
(fn: OnFn, date: Date, onError: OnErrorFn)

Source from the content-addressed store, hash-verified

302}
303
304async function runAsync(fn: OnFn, date: Date, onError: OnErrorFn){
305 try {
306 await fn(date);
307 }catch (error: any) {
308 onError(date, error);
309 }
310}
311
312function getDelay(nextRun: Date) {
313 const maxDelay = 86400000;

Callers 1

heartBeatMethod · 0.85

Calls 1

onErrorFunction · 0.85

Tested by

no test coverage detected