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 8044603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T05:16:54+00:00 2026-06-05T05:16:54+00:00

I would like to run a time consuming script (to update a database from

  • 0

I would like to run a time consuming script (to update a database from a 3rd party API) at regular intervals. I was wondering what the best practice for this would be:

  1. What should the ‘script’ be – an ASP.NET service? Bearing in mind I am on shared hosting, this may not be possible (but I would like to know).
  2. How could the script be scheduled to run at regular intervals/at set time automatically?

Thanks in advance!

  • 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-05T05:16:55+00:00Added an answer on June 5, 2026 at 5:16 am

    What you can do is add a System.Timers.Timer in Global.asax.

    System.Threading.Timer timer = new System.Threading.Timer(new TimerCallback(TimerElapsed), null, new Timespan(0), new Timespan(24, 0, 0));
    
    // This will run every 24 hours.
    private void TimerElapsed(object o)
    {
        // Do stuff.
    }
    

    In IISManager, enable HTTP-Keep Alives for your application.

    In IIS Manager, select Http Response Headers Module, open it and in the Actions Pane, select Set Common Headers and in there select Enable Http Keep Alives.

    Also, check for a setting of your application pool –

    Select the application pool of your application, select Advanced Settings from the right Actions Tab.

    In there there is a setting called – Idle Timeout (minutes)

    By default it is 20 Minutes. Make it something like 60 Minutes or increase it even more and check.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to specify the regular expression during run-time, not compile-time. So that
I would like to run a console application with elevated permissions. Running it from
I would like to conditionally change the background image of my Cluetips during run-time
I would like to be able to know, in run-time in my code, how
I would like to run a function whenever a user's session is destroyed/times out.
I would like to run a external command in perl and filter some of
I have a series of 'tasks' that I would like to run in separate
I have a function (stored procedure) defined in a database that I would like
I would like to use Runtime.exec() to initiate another process in a directory with
I would like to avoid redistributing .NET runtime if possible with my application since

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.