How should I handle cron jobs on nodester?
Pergunta
I'd like to watch for certain changes on a couchdb in a NodeJS app, currently hosted on Nodester.
Is it OK to just open long polling sockets or use setTimeout() in a Nodester app? Or is there some typical way people handle this on Nodester or similar hosts?
Solução
Node.js apps are long running processes by nature, so you can handle these problems in the process.
I would see no problem in using setInterval
to either run the task on a fixed interval or check a task queue on a fixed interval. This should work just fine.
Any questions let me know.
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow