Calculate when a cron job will be executed then next time

后端 未结 8 952
庸人自扰
庸人自扰 2020-12-02 08:19

I have a cron \"time definition\"

1 * * * * (every hour at xx:01)
2 5 * * * (every day at 05:02)
0 4 3 * * (every third day of the month at 04:00)
* 2 * * 5          


        
8条回答
  •  无人及你
    2020-12-02 08:49

    Created javascript API for calculating next run time based on @dlamblin idea. Supports seconds and years. Have not managed to test it fully yet so expect bugs but let me know if find any.

    Repository link: https://bitbucket.org/nevity/cronner

提交回复
热议问题