mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-12 19:59:02 +08:00
[agenda] Added 'skipImmediate' field in 'options' argument of Job.repeatEvery method
This commit is contained in:
@@ -81,6 +81,10 @@ var mongoConnectionString = "mongodb://127.0.0.1/agenda";
|
||||
|
||||
job.repeatEvery('10 minutes');
|
||||
|
||||
job.repeatEvery('10 minutes', { timezone: 'America/New_York' });
|
||||
|
||||
job.repeatEvery('10 minutes', { skipImmediate: true });
|
||||
|
||||
job.repeatAt('3:30pm');
|
||||
|
||||
job.schedule('tomorrow at 6pm');
|
||||
|
||||
7
types/agenda/index.d.ts
vendored
7
types/agenda/index.d.ts
vendored
@@ -343,10 +343,11 @@ declare namespace Agenda {
|
||||
/**
|
||||
* Specifies an interval on which the job should repeat.
|
||||
* @param interval A human-readable format String, a cron format String, or a Number.
|
||||
* @param options An optional argument that can include a timezone field. The timezone should be a string as
|
||||
* accepted by moment-timezone and is considered when using an interval in the cron string format.
|
||||
* @param options An optional argument that can include a timezone field or skipImmediate field.
|
||||
* The timezone should be a string as accepted by moment-timezone and is considered when using an interval in the cron string format.
|
||||
* Setting skipImmediate as true will skip the immediate run. The first run will occur only in configured interval.
|
||||
*/
|
||||
repeatEvery(interval: string | number, options?: { timezone?: string }): this
|
||||
repeatEvery(interval: string | number, options?: { timezone?: string, skipImmediate?: boolean }): this
|
||||
|
||||
/**
|
||||
* Specifies a time when the job should repeat. [Possible values](https://github.com/matthewmueller/date#examples).
|
||||
|
||||
Reference in New Issue
Block a user