puppet-whatsapp icon indicating copy to clipboard operation
puppet-whatsapp copied to clipboard

It is not a good idea for using node-schedule in a Puppet implementation.

Open su-chang opened this issue 3 years ago • 2 comments

See detail here: https://github.com/wechaty/puppet-whatsapp/pull/322#discussion_r815619510

  • [ ] setTimeout
  • [ ] node-schedule

su-chang avatar Feb 28 '22 07:02 su-chang

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.

hcfw007 avatar Feb 28 '22 07:02 hcfw007

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.

huan avatar Feb 28 '22 11:02 huan