-1

I want a bot that will send a message every 1 hour and 10 minutes at the hour so once at 15:10 another at 16:10 and so on, how should go about doing that? please provide the code if possible // i tried using setInterval but i would have to wait till the hour every time I tweak the code

  • Well, not identical but still looks deeply helpful for your case: https://stackoverflow.com/q/47548081/4636715 – vahdet Aug 28 '20 at 11:03

1 Answers1

0

You can use node-cron to schedule the job to run at 10 past every hour.

const cron = require("node-cron");

cron.schedule("10 * * * *", yourFunction);
Jim Nilsson
  • 838
  • 4
  • 12