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

  • SEARCH
  • Home
  • 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 8304581
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T17:53:21+00:00 2026-06-08T17:53:21+00:00

I am creating a chrome extension and I need to use an interval. The

  • 0

I am creating a chrome extension and I need to use an interval.

The time the interval will go off every time is chosen by the user itself.

The function executes on every open tab and sends data to it.

My problem is that the “timer” dosn’t work like it should, it just execute all at once like a normal while loop.

Here is the code:

chrome.tabs.query({}, function (tabs) {
//the times the code need to run is by the amount of tabs that is open
        setInterval(function () {
            if (i < tabs.length) {

                chrome.tabs.sendRequest(tabs[i].id, { input: "uCanSend",

                    userName: myName,
                    password: myPass,

                    subject: mySubject, msg: myMsg,

                    linkName1: myLinkName1,
                    linkURL1: myLinkURL1,

                    linkName2: myLinkName2,
                    linkURL2: myLinkURL2

                }, function (response) { });

            }
            i++;
        }, timeInMintus //the time that the code need to run every time);
    });

I have no idea what am I doing wrong.
Any idea how to fix it that it will run correctly?

(sorry for my English)

  • 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-06-08T17:53:24+00:00Added an answer on June 8, 2026 at 5:53 pm

    The second argument needs to be in milliseconds (thousandths of a second). Based on the variable name, it looks like you’re passing minutes. For example, if you want the callback to run every minute:

    setInterval(function () { /* snip */ }, 1000*60);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating a Chrome extension which will send the URL of every page
I'm creating a Chrome extension that uses key bindings (i.e. will use javascript keydown
I am creating a chrome extension, and need to click on the first link
I am creating a Chrome Extension that upon clicking the extension icon will present
I am creating an google-chrome-extension which has html notifications. There will be a close
I'm creating a Chrome extension using user's key event. But I want to alert
I am creating a chrome extension, where i plan to use OAuth2 client side
I am new to the world of creating Chrome extensions. My extension will not
I'm creating a chrome extension, and want to be able to get a profile
I am creating a Google Chrome extension where it would grab the link of

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.