How to test a cron job in Local Server like WAMP?

后端 未结 10 2117
一生所求
一生所求 2020-12-31 06:06

How to test a cron job in Local Server like WAMP?

10条回答
  •  渐次进展
    2020-12-31 06:43

    You can create a html page and open it on browser. The javascript setInterval function will call for specified periods.

    Following is the code to do this. Specify your interval (5000 eg. which runs every 5sec)

    
    
        Cron
    
    
    
    

    Cron page

    Note: To avoid CORS you should call ajax from same host or allow CORS from server side.

提交回复
热议问题