Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

191
Visualizações
Making a clustered Node.JS app run user-created tasks every few minutes?

I'm currently using cluster with Node.js. The user will be able to send a request to the server to check on something. What I'm struggling to figure out is how to approach this.

One solution would be for the user to request the information and the server gets it for them. So every 10 minutes the user would send a request to the server. This way, it's handled automatically with express and cluster, but it's not exactly what I would prefer. I would prefer the server to have cron-like tasks that spread around the cluster.

I was thinking another solution might be to have a database with the list of user tasks to do. A cluster periodically checks the database, checks all tasks and their "last ran" time stamp, then does a task if the last ran timestamp was 10 minutes ago. I feel like there must be a cleaner solution, though.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda