RepeatEvery
Last updated
Was this helpful?
Last updated
Was this helpful?
job.repeatEvery(interval, options?)
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): If true
, skips the immediate first execution of the job schedule.
Job
: Returns the job instance, allowing for method chaining.