Hi. I've seen there are already some other bugs for this, but I also have a minimal code example for reproduction.
- node-cron 4.2.1
- Node 24.14.0
import cron from 'node-cron';
import Sinon from 'sinon';
Sinon.useFakeTimers(new Date('2026-03-31T09:00:01.000-02:00').getTime());
const job = cron.schedule('0 0 * * *', () => {}, { scheduled: false });
const nextRun = job.getNextRun();
console.log(nextRun);
Yesterday, the gextNextRun() gave the expected result, today in the morning it does not. Perhaps related to end of the month?
Hi. I've seen there are already some other bugs for this, but I also have a minimal code example for reproduction.
Yesterday, the
gextNextRun()gave the expected result, today in the morning it does not. Perhaps related to end of the month?