Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
20 lines
776 B
Plaintext
20 lines
776 B
Plaintext
export interface NodeSchedule {
|
|
scheduleJob(nameOrExpression: string | Date | object, expressionOrCallback: string | Date | object | (() => void), callback?: () => void): unknown;
|
|
}
|
|
/**
|
|
* Instruments the `node-schedule` library to send a check-in event to Sentry for each job execution.
|
|
*
|
|
* ```ts
|
|
* import * as Sentry from '@sentry/node';
|
|
* import * as schedule from 'node-schedule';
|
|
*
|
|
* const scheduleWithCheckIn = Sentry.cron.instrumentNodeSchedule(schedule);
|
|
*
|
|
* const job = scheduleWithCheckIn.scheduleJob('my-cron-job', '* * * * *', () => {
|
|
* console.log('You will see this message every minute');
|
|
* });
|
|
* ```
|
|
*/
|
|
export declare function instrumentNodeSchedule<T>(lib: T & NodeSchedule): T;
|
|
//# sourceMappingURL=node-schedule.d.ts.map
|