I'm wondering, is there is way to implement background taks, maybe with workers pool. Can you show me direction, i'm thinking about writing package for this?
|
There are several packages to run background tasks in Meteor. From the simplest to the most involved:
Packages I would recommend caution with:
Avoid: |
|||||||||||||||||||||
|
There is a package based on Cron jobs which can be used to schedule tasks on certain intervals or dates. Here is the package: https://atmosphere.meteor.com/package/cron And if you happen to look into the source of that package, you'll notice they're simply using:
So if you save your tasks in a database, then load them into intervals during startup, then you'll probably be on the right track. |
|||||
|
I'm guessing proper support is on their roadmap, but in the meantime I've managed to get it going in a hacky way via |
|||||
|