【发布时间】:2021-02-12 22:16:10
【问题描述】:
我正在使用 node-cron 来使用 cron。
这是我到目前为止所做的 -
cron.schedule('10 * * * *', cronJobController.sendReminderNotification, { scheduled: true, timezone: 'Asia/Kolkata' });
cron.schedule('20 * * * *', cronJobController.sendReminderNotification, { scheduled: true, timezone: 'Asia/Kolkata' });
cron.schedule('30 * * * *', cronJobController.sendReminderNotification, { scheduled: true, timezone: 'Asia/Kolkata' });
我必须为每一分钟写一个单独的声明。
如何在一行代码中实现这一点?
任何帮助将不胜感激。
提前致谢。
【问题讨论】:
标签: node.js express cron node-cron