0

I use render to Deploy my server node cron does not work But works on my machine.

const job = new CronJob({
  //* * * * * every minute --- for Debugging
  //0 */6 * * * every 6 hours --- in production
  cronTime: "0 */6 * * *",
  onTick: function () {
    console.log("start crawling", new Date());
  },
  start: true,
});

async function startServer() {
  await mongoose.connect(process.env.MONGO);
  server.listen(PORT, () => {
    console.log(`Listening on ${PORT}...`);
  });
  job.start();
}

startServer();

I didn't see the logs in the Render server What I need to do

it is not a problem with timezone because is every 6 hours

oren a
  • 16
  • 5

0 Answers0