Fire event at a certain time of the day

前端 未结 4 1405
一整个雨季
一整个雨季 2020-12-31 08:08

Is it possible with javascript (jQuery solutions are fine too) to fire an event/call a function at certain times of the day e.g.

call myFunctionA at 10:00

ca

4条回答
  •  温柔的废话
    2020-12-31 08:25

    • Get current time
    • Get in milliseconds, the time difference between next execution time minus current time
    • Settimeout with result millisecons

提交回复
热议问题