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

Function importTaskModule

src/tasks/background-scheduled-task/daemon.ts:60–70  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

58 * the meaningful one (the fallback usually fails with an unrelated URL error).
59 */
60async function importTaskModule(path: string) {
61 try {
62 return await import(path);
63 } catch (firstError) {
64 try {
65 return await import(fileURLToPath(path));
66 } catch {
67 throw firstError;
68 }
69 }
70}
71
72function sendEvent(event: TaskEvent, context: TaskContext) {
73 const message: any = { event: event, context: safelySerializeContext(context) };

Callers 1

startDaemonFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected