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

233
Views
How to make an api request every minute based on props that are updating every 3 seconds?

I am trying to make an api request every minute based on a set of conditions. The issue Im having is the props I am reading are updating every 3 seconds so if I create a function with a setTimeout or any timer method inside seems to reset every 3 seconds so it can never make it to one minute. I am new to dev and Ive never done anything like this, any advice would be helpful. Thanks!

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

0

Settimeout only work once you need to use setinterval instead it will repeat every 3 second You can make 2 interval one run every 3 second and the other every minute Or you can make variable every time the function run increment it by 1 and every time this variable is divisable by 20 (mean 60 sec passed) you can call the api

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!