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

431
Views
Quiero ejecutar la cuenta regresiva cada 30 minutos, ¿cómo se puede hacer?

Quiero ejecutar la cuenta regresiva cada 30 minutos en el siguiente código, la cuenta regresiva debe ejecutarse cada 30 minutos.

 function createCountDown(elementId, sec) { var tms = sec; var x = setInterval(function() { var distance = tms*1000; var days = Math.floor(distance / (1000 * 60 * 60 * 24)); var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60)); var seconds = Math.floor((distance % (1000 * 60)) / 1000); document.getElementById(elementId).innerHTML =days+"d: "+ hours + "h "+ minutes + "m " + seconds + "s "; if (distance < 0) { clearInterval(x); document.getElementById(elementId).innerHTML = "{{__('COMPLETE')}}"; } tms--; }, 1000); } createCountDown('counter', {{\Carbon\Carbon::tomorrow()->diffInSeconds()}}); } } };
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Puedes usar setInterval() .

 setInterval(function () { // Run your countdown script .... }, 1800000) // 1800000 // miliseconds = 30 minutes
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!