Closed lpgera closed 11 months ago
thanks for reporting on this issue @lpgera!
after a bit of debugging, turns out this bug is due to not updating the internal runOnce
property if setTime()
is passed an actual date:
so the callback is actually called once, but right after this it tries to execute again, causing this error.
I'm preparing a PR with the fix!
:tada: This issue has been resolved in version 3.1.4 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Description
When I reschedule a job to a specific date using the
job.setTime(new CronTime(startDate))
function, the job throws an error at the scheduled time instead of executing.Expected Behavior
I expect the job to run at
startDate
.Actual Behavior
I'm getting the following error:
Possible Fix
No response
Steps to Reproduce
Context
This used to be working properly in earlier versions of the library.
Your Environment
cron
version: 3.1.3