hytex
V2EX  ›  问与答

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

  •  
  •   hytex · Aug 19, 2019 · 1525 views
    This topic created in 2463 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   ·   5864 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 07:31 · PVG 15:31 · LAX 00:31 · JFK 03:31
    ♥ Do have faith in what you're doing.