Closed wassimsalib closed 9 years ago
You don't need this module to do this I think... Put your job under config/bootstrap.js and if it's separate as sails create a new node process. This module only works with cron job witch is repetitive task so I don't think you can do it with this module.
Great, thanks for the quick reply, so you mean create another node process dynamically or you mean 2 different apps running at the same time?
You're welcome :) Depend of what you are trying to do, under config/bootstrap.js you can create another node process dynamically I think if you second project is dependent to the first if they are 2 independent project 2 different apps is better.
I have tried to use sails.on('lifted',function(){}) , but that is still didn't solve my problem, it still blocks the web server.
Best Regards, Wassim Salib
On Mon, Aug 17, 2015 at 3:25 AM, Jaumard notifications@github.com wrote:
You're welcome :) Depend of what you are trying to do, under config/bootstrap.js you can create another node process dynamically I think if you second project is dependent to the first if they are 2 independent project 2 different apps is better.
— Reply to this email directly or view it on GitHub https://github.com/jaumard/sails-hook-schedule/issues/1#issuecomment-131742148 .
Yes cause you don't create another node process, look this tutorial it will help you I think http://jlunaquiroga.blogspot.fr/2014/03/creating-processes-in-nodejs.html
Awesome, thanks a lot :+1:
I have a job that needs to run once after the sails server is lifted and It has to run on parallel to so it doesn't block the incoming connections, so can this module allow this? Thanks