This will help you to schedule any function to be executed daily at a specific time. Can be used on a browser or in an electron app depending on the browser's/operating system's time zone.
Install daily-scheduler using npm:
$ npm install daily-scheduler
Import daily-scheduler and schedule a task:
var schedule = require('daily-scheduler');
schedule(14,0,0, () => {
console.log("It's 02:00 PM!");
});
daily-scheduler takes 4 arguments
- hours: 0 - 23
- minutes: 0 - 59
- seconds: 0 - 59
- callback: function, typically
() => void