RepeatEvery
job.repeatEvery(interval, options?)
job.repeatEvery(interval, options?)
Example Usage
const job = pulse.create('test', {});
job.unique({ 'data.type': 'email', 'data.userId': '12345' });
await job.save(); // If you want to save it
Parameters
interval
(string
): A human-readable string that specifies how often the job should run, such as'5 minutes'
,'2 hours'
,'1 day'
.options
(JobOptions
- optional): Additional settings to further configure the repeating job:timezone
(string
- optional): The timezone in which to base the job's timing.startDate
(Date | number
- optional): A specific start date or timestamp from which the job should start repeating.endDate
(Date | number
- optional): A specific end date or timestamp after which the job should no longer repeat.skipDays
(string
- optional): A string representing days to skip, useful for setting jobs to run only on specific days of the week.e.g. ('2 days')
skipImmediate
(boolean
- optional): Iftrue
, skips the immediate first execution of the job schedule.
Returns
Job
: Returns the job instance, allowing for method chaining.
Last updated
Was this helpful?