Hello,
I'm trying to create a job that is supposed to repeat once a year on a specific date.
My cron interval looks like this: 0 16 13 8 *
Once the job is executed its nextRunAt is set not a year later but a month later.
Here's how I schedule the job
this._agenda.jobs({name: jobId}, (err, job1) => {
if (job1 && job1.length === 0) {
this._agenda.define('someJobId', (job: Agenda.Job, done: (err?: Error) => void) => {
this._doJobs('someJobId', job, done).then().catch(e => {
Promise.reject(e);
});
});
let job = this._agenda.create(jobId, jobInfo)
.schedule(new Date())
.repeatEvery('0 16 13 8 *', {
timezone: 'America/Toronto',
skipImmediate: true
});
job.save();
} else if (!err) { /* print error message */ });
And here's how it looks like in mongo after it's executed once:

I could be missing something obvious and would appreciate your help.
Thank you
That's because 0 16 13 8 * is At 16:00 on day-of-month 13 in August
https://crontab.guru/#0_16_13_8_*
EDIT: never mind. you might be right. what happens if you remove the skipImmediate: true?
Tried without skipImmediate: true. nextRunAt is set on the same day and time of the next month
The following is after the "yearly" job has ran once

This seems to be the same as this issue https://github.com/agenda/agenda/issues/358 ...
I would think this would be an extremely high priority issue since this is base functionality. Do we know if a fix is in progress or expected soon?
Most helpful comment
This seems to be the same as this issue https://github.com/agenda/agenda/issues/358 ...
from 2016!
I would think this would be an extremely high priority issue since this is base functionality. Do we know if a fix is in progress or expected soon?