MCPcopy
hub / github.com/midwayjs/midway / IJob

Interface IJob

packages/cron/src/interface.ts:15–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13}
14
15export interface IJob {
16 /**
17 * The function to fire at the specified time. If an onComplete callback was provided, onTick will receive it as an argument. onTick may call onComplete when it has finished its work.
18 */
19 onTick();
20
21 /**
22 * A function that will fire when the job is stopped with job.stop(), and may also be called by onTick at the end of each run.
23 */
24 onComplete?(result: any);
25}
26
27export type JobNameOrClz = string | (new (...args) => IJob);
28

Callers 1

addJobMethod · 0.65

Implementers 4

DataSyncCheckerJobpackages/cron/test/index.test.ts
TraceJobpackages/cron/test/index.test.ts
HelloTaskpackages/cron/test/fixtures/base-app/s
HelloTaskpackages/cron/test/fixtures/base-app-e

Calls

no outgoing calls

Tested by

no test coverage detected