【发布时间】:2020-08-06 12:51:04
【问题描述】:
我在使用 node-cron 库在 node/express 应用程序中执行 cron 作业时遇到问题。该应用程序部署在 Google Cloud App Engine 上。
我想每天早上 9 点自动发送电子邮件,但 cron 只在第一天工作,然后从不发送。
这是我的代码:
cron.schedule("0 0 9 * * *", () => {
sendEmails();
},{
scheduled: true,
timezone: "Europe/Paris"
});
谢谢
【问题讨论】:
标签: node.js express google-app-engine google-cloud-platform cron