steedos-platform icon indicating copy to clipboard operation
steedos-platform copied to clipboard

定时任务元数据 .cron.yml:可配置定时调用微服务中的action

Open hotlong opened this issue 2 years ago • 0 comments

xxxx.cron.yml ,暂时考虑用代码定义,后期也可以在数据库中配置。

name: 定时请安
cronTime: '* * * * * *'
onTickAction: 'spaces.find'
  • cronTime - [REQUIRED] - The time to fire off your job. This can be in the form of cron syntax or a JS Date object.
  • onTickAction - [REQUIRED] - The actionName to fire at the specified time.

https://github.com/kelektiv/node-cron

hotlong avatar Jul 20 '22 08:07 hotlong