Thursday 30 April 2020

Suggestions regarding node-cron.

My scenario:We have many usersI am am planning to use node-cron: https://www.npmjs.com/package/node-cronThese users have 'invoice periods', invoice data for each users should be entered in database based on their individual 'invoice periods'for eg user-1 has 7 days invoice period, user-2 has 30 days invoice periodwe will need 2 cron jobs to accomplish theseI am using adonisjsSince these cron jobs must be initialized as soon as the server starts, may be they should be placed in the entry point of the server i.e index js but this doesnt sound good practiceMy question is where should this function be placed within the code base, again, its an adonisjs system

Submitted April 30, 2020 at 07:21AM by ajirnanashak

No comments:

Post a Comment