How to run a function at specific time & date?

前端 未结 5 1491
日久生厌
日久生厌 2020-12-02 17:40

How can I run a function at a given time and date?

Example: I have a function that needs to run on the 12th of each month at 10AM.

This page will be running

5条回答
  •  暖寄归人
    2020-12-02 18:42

    maybe use and iframe with meta refresh and workout content server side

    
    

    or use javascripts setInterval

    var interval = 300000; // run in 5 minutes
    window.setInterval("reloadRefresh();", interval);
    
    function reloadRefresh() {
     // do whatever
    }
    

    and

提交回复
热议问题