'How to run cronjob specific time (UTC) with Node-Cron?

I use node-cron library for working with schedule task. I want to run my task every 1hr ( 00.00, 01.00, 02.00...24.00) in timezone of UTC but it doesn't work ( time was incorrect)

Thank you.



Solution 1:[1]

You need to define the time you want. You can use this website to do this.

Or use this example :

var cron = require('node-cron');

cron.schedule("0 * * * *", () => { // 0 * * * * = every houre at minute 0
    console.log("running a task every houre");
});

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Matthieu VETOIS