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

201
Views
Calling a promise function after delay

I am trying to make a promise function repeatedly call itself after interval

The promise function:

function bd() {
  return new Promise((resolve, reject) => {
        // gets message_bd
        resolve(message_bd)     
    })
  }

I try to call it repeatedly every 3 seconds like so:

var interval = setInterval(function(){
    bd().then((message_bd) => {
      console.log(message_bd)
  },3000);

the bd() gets called after the first 3 seconds and the message_bd gets resolved (everything's working), but then I get this error as the second 3 seconds finish:

 bd().then((message_bd) => {
    ^

TypeError: bd is not a function

Would appreciate any help :)

about 4 years ago · Juan Pablo Isaza
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!