Replies: 2 comments 2 replies
-
https://www.eggjs.org/zh-CN/basics/schedule#%E7%B1%BB%E5%9E%8B 选择 worker 模式,只会随机挑选一个 worker 执行。 |
Beta Was this translation helpful? Give feedback.
0 replies
-
是这样的,我不是用egg自带的schedule。我是从数据库里读出来的数据,每条数据有执行相应任务的时间戳,我用node-schedual根据时间戳来注册的定时任务。所有worker应该都会执行,这样就容易造成同一任务执行多次 @fengmk2 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
请问在多进程模式下,在app.js中注册的动态定时任务,如果该worker挂掉后,定时任务还会不会执行?如果多个worker同时执行,那我业务逻辑,比如写入一定的数据到mysql,会不会写入多份
Beta Was this translation helpful? Give feedback.
All reactions