How do we perform a repetitive task (once a day for example) in sailsjs. I need to analyze the records in my database, and I want to do it all at once so the user doesn't have to wait each time they update their records.
我们如何在sailsjs中执行重复任务(例如每天一次)。我需要分析数据库中的记录,我希望一次完成所有操作,这样用户每次更新记录时都不必等待。
1 个解决方案
#1
5
You can either roll out your own solution using libraries like Kue, or Agenda, or node-cron, or you can use something like sails-hook-schedule
您可以使用Kue,Agenda或node-cron等库来推出自己的解决方案,也可以使用sails-hook-schedule之类的东西。
#1
5
You can either roll out your own solution using libraries like Kue, or Agenda, or node-cron, or you can use something like sails-hook-schedule
您可以使用Kue,Agenda或node-cron等库来推出自己的解决方案,也可以使用sails-hook-schedule之类的东西。