Open su-chang opened 2 years ago
If node-schedule package has no known issue, i think it's fine to use this package.
I mean there's no need to create a new wheel if the existing one is just fine, and there will possibly be more scheduled jobs in the future that could use node-schedule like clearing cache.
After I quickly reviewed the code I can not see any necessity to use this pattern.
It only adds up the complexity and can be simply replaced by setTimeout
with a few lines of code I think.
However, I'm ok if both of you feel better by using node-schedule
.
See detail here: https://github.com/wechaty/puppet-whatsapp/pull/322#discussion_r815619510