const mongoconection =url;
const agenda = new Agenda({
db: {
address: mongoconection,
collection: "agendajobs",
option: { useUnifiedTopology: true }
}
});
new Promise(resolve=> agenda.once('ready', resolve));
agenda.define("say hello", job => {
console.log('hello');
});
(async function() {
await agenda.start();
await agenda.schedule(4/2/2020, 'say hello');
//repeat every
})();
我怎样才能将动态日期传递给议程?``如果我在这个格式中给予它会下降 2020 年 4 月 2 日如果我给 5 分钟甚至每周一次,如果工作有人可以帮助我如何给时间和指定日期