Schedule
job.schedule(time)
job.schedule(time)
Example Usage
const job = pulse.create('test', {});
job.schedule(new Date(2023, 11, 17, 10, 30));
await job.save(); // If you want to save it
Parameters
time
(string | Date
): The time at which the job is scheduled to run. This can be aDate
object representing the exact time for the job to run.
Returns
Job
: Returns the job instance with the updatednextRunAt
attribute, allowing for method chaining.
Last updated
Was this helpful?