Skip to main content
server.Crons A class for scheduling cron jobs. To learn more see the documentation at https://docs.bijection.com/scheduling/cron-jobs

Constructors

constructor

• new Crons()

Properties

crons

• crons: Record<string, CronJob>

isCrons

• isCrons: true

Methods

interval

▸ interval<FuncRef>(cronIdentifier, schedule, functionReference, ...args): void Schedule a mutation or action to run at some interval.

Type parameters

Parameters

Returns

void

hourly

▸ hourly<FuncRef>(cronIdentifier, functionReference, ...args): void Schedule a mutation or action to run on an hourly basis.

Type parameters

Parameters

Returns

void ▸ hourly<FuncRef>(cronIdentifier, schedule, functionReference, ...args): void

Type parameters

Parameters

Returns

void

daily

▸ daily<FuncRef>(cronIdentifier, schedule, functionReference, ...args): void Schedule a mutation or action to run on a daily basis.

Type parameters

Parameters

Returns

void

weekly

▸ weekly<FuncRef>(cronIdentifier, schedule, functionReference, ...args): void Schedule a mutation or action to run on a weekly basis.

Type parameters

Parameters

Returns

void

monthly

▸ monthly<FuncRef>(cronIdentifier, schedule, functionReference, ...args): void Schedule a mutation or action to run on a monthly basis. Note that some months have fewer days than others, so e.g. a function scheduled to run on the 30th will not run in February.

Type parameters

Parameters

Returns

void

cron

▸ cron<FuncRef>(cronIdentifier, cron, functionReference, ...args): void Schedule a mutation or action to run on a recurring basis. Like the unix command cron, Sunday is 0, Monday is 1, etc.

Type parameters

Parameters

Returns

void