V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
hytex
V2EX  ›  问与答

分布式部署之后,如果有定时任务怎么解决比较好呢

  •  
  •   hytex · Aug 19, 2019 · 1504 views
    This topic created in 2451 days ago, the information mentioned may be changed or developed.

    我个人想法是想自己建一张表,然后通过这张表来判断定时任务是否可以执行。这张表里存定时任务的名字和当次运行的时间。然后每次运行的时候都查这个最新的时间,如果没有超过 XX 时间就不让执行。 请问这种方式可取吗,如果不可取还有其他方式么。

    mzeht
        1
    mzeht  
       Aug 20, 2019
    什么语言的? java 有 quartz ,elstic-job
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5397 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 09:37 · PVG 17:37 · LAX 02:37 · JFK 05:37
    ♥ Do have faith in what you're doing.