I'm using Cron; a nodejs package for cron job handling in NodeJs. Here's how I'm running a cron job:
var job = new CronJob({
cronTime: '00 30 11 * * 1-5',
onTick: function() {
/*
* Runs every weekday (Monday through Friday)
* at 11:30:00 AM. It does not run on Saturday
* or Sunday.
*/
}
});
job.start();
It's running flawlessly but is there any standard way to handle exception dates array handling? For example here's my dates array of national holidays and I don't want to run my cron job on these days:
['28-01-2017', '1-05-2017', '14-08-2016', '15-09-2016', '16-09-2016']