I need to run a node-cron schedule once everyday i.e., once every 24hours. Can I do it without specifying time?
var job = new CronJob('0 0 0 * * *', function() {
})
I need to run a node-cron schedule once everyday i.e., once every 24hours. Can I do it without specifying time?
var job = new CronJob('0 0 0 * * *', function() {
})
You cant do it without specifying time as cron needs time on which it has to excecute callback function.
You can use "0 0 */1 * *" which will be executed "At 00:00 on every day-of-month"
var job = new CronJob('0 0 */1 * *', function() {
// here goes things you want to execute
})