RepeatAt

job.repeatAt(time)

The repeatAt method schedules a job to repeat at a specific time that is stated in a human-readable format or as a precise time value. This capability is essential for scheduling jobs that must run at regular intervals on specific schedules.

This does NOT save the job in the database. you must explicitly declare save()if you want to save it

Example Usage

const job = pulse.create('test', {});
job.repeatAt("17:00");
await job.save(); // If you want to save it

Parameters

  • time (string): The time at which the job should repeat. This can be specified in a human-readable format (e.g., "03:00 PM", "15:00"). Format docs

Returns

  • Job: Returns the job instance, allowing for method chaining. This facilitates additional configurations or method calls to be chained after setting the repeat time.

Last updated