Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6477719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:58:58+00:00 2026-05-25T06:58:58+00:00

I want to schedule events, that will fire and call my predefined callback How

  • 0

I want to schedule events, that will fire and call my predefined callback

How can schedule in js / jquery:

  1. one time event?
  2. recurring event (to call my function every minute, or five minutes)?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T06:58:58+00:00Added an answer on May 25, 2026 at 6:58 am

    You want setTimeout for a one time event and setInterval for a repeating event.

    Both take two arguments: a function and an interval of time specified in milliseconds.

    var delay_millis = 1500;
    
    //will alert once, at least half a second after the call to setTimeout
    var onceHandle = window.setTimeout(function() {
      alert("Time has passed!");
    }, delay_millis);
    
    //will alert again and again
    var repeatHandle = window.setInterval(function() {
      alert("Am I annoying you yet?");
    }, delay_millis);
    

    Bonus: if you keep around the values returned by calling these functions, you can cancel the callback if you need to.

    var shutUpShutUp = function() {
      window.clearInterval(repeatHandle);
    };
    
    shutUpShutUp(); //now I can hear myself think.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to call procedure at certain time, so I instatinate an event that
I want to make an SMS scheduling app, that sends SMS at predefined time.
I want to schedule events to happen for my users. Is there an efficient
I want to write a windows service which the user can schedule. i.e, the
I want to write a script that will stop a scheduled task on a
I have to store scheduled events, (like say class times, for example) that can
I have an app where I want to schedule some events. So I want
I want to schedule the email with asp.net and C# code. what is basic
I am running a SVN server on my Windows Server and want to schedule
I want a way to be able to schedule callbacks, I want to be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.