Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

197
Views
node.js : How to combine a server that does post requests on a timed basis, with a server which listens for events

So I am working on a project where there is a program like the following:

async function watch(){
    "does post requests"
}
async function timer() {
    await watch();
};
let tmr = setInterval(function(){ timer() }, 6 * 1000);

async function main() {
   "does event listening"
}
main()

and it is very clunky.

I am wondering if there are any node wizards here that can help with this sort of architecture problem?

I.e. How to combine a server that does post requests on a timed basis, with a server which listens for events.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

What might interest you is: https://www.npmjs.com/package/node-cron

You could simply create the http server and declare routes to receive requests, and configure node cron-job that will send requests of your choice on a timed basis.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!