0

How to run node-scheduler once on mentioned time not after every minute or second but once according to time passes in params. i have used this let someDate = new Date('22022-01-28T17:59:50.000+00:00') and

console.log('a')
}

but it is NOT WORKING ACCORING TO THE REQUIREMENT i just want to run once on the provided time .BUt now it is running again and again i have tried this too const date = new Date(2022, 1 ,28, 10, 57, 0) like i want to run it on 28-01-2022 at 10:57pm But it is not running

1 Answers1

0

It accepts hour in 24 hour format, so

new Date(2022, 1 ,28, 22, 57, 0) 

should be the correct approach.

sid
  • 1,779
  • 8
  • 10