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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T11:34:22+00:00 2026-06-11T11:34:22+00:00

I am building a website now for a library and i need to check

  • 0

I am building a website now for a library and i need to check every day at the same time if there are people who need to return their books in the next five days and to send them a reminder via email.

My question is what will be the correct way to do that?

What i need to accomplish is when the specific time of day comes i need to run an sql stored procedure and check either through visual studio 2010 or any other way if the stored procedure has returned any results to which i need to email.

Is there a way to maybe check the system time constantly on C# and not as a triggered event?

  • 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-11T11:34:23+00:00Added an answer on June 11, 2026 at 11:34 am

    I’d image the simplest way to do this would be by creating a new job in the SQL Server Agent to call your stored procedure every day, rather than trying to achieve this in an application you’ve written.

    See the following link for more information on creating SQL Jobs

    Edit – Sorry, I really shouldn’t try to answer SO posts while doing other work too. I completely missed the fact you wanted to send off emails, and got it into my head that you wanted to report overdue records on screen. Duh.

    To send off overdue emails at a certain time every day, i’d guess a windows service would certainly do the job, but seems a little over the top, and you’d need to have full control over the server it’s running on.

    You could instead set up a scheduled task to call a sendOverdueMail.aspx web page every day to do the work perhaps? Like this

    Obviously there is the SQL Server Agent emailing option too, although I’m not sure how much control you’d have over the format of the emails that would produce.

    Finally, this tutorial steps through creating a scheduled task type effect, by hooking into cache expiry events on an ASP.net server, which then allow you to call your emailing code.

    private const string DummyCacheItemKey = "GagaGuguGigi";
    protected void Application_Start(Object sender, EventArgs e)
    {
        RegisterCacheEntry();
    }
    
    private bool RegisterCacheEntry()
    { 
        if( null != HttpContext.Current.Cache[ DummyCacheItemKey ] ) return false;
    
            HttpContext.Current.Cache.Add( DummyCacheItemKey, "Test", null, 
            DateTime.MaxValue, TimeSpan.FromMinutes(1), 
            CacheItemPriority.Normal,
            new CacheItemRemovedCallback( CacheItemRemovedCallback ) );
    
        return true;
    }
    
    
    public void CacheItemRemovedCallback( string key, 
            object value, CacheItemRemovedReason reason)
    {
        Debug.WriteLine("Cache item callback: " + DateTime.Now.ToString() );
    
        // send reminder emails here
        DoWork();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am building a php based website but now i need to give user
i'm currently building a new private website and now it's time for building the
So I was learning JavaScript/jQuery and building a website as I go along. Now
I'm building a multi-lingual website using drupal 7. Now, I'm in the process of
I am building a website templating system where multiple user can create their own
I'm building a website that allows users to check the availability of international domain
I'm building a website with Rails which can let user check if some domains
I'm building a community website where users sign up and create profiles. Now when
I'm building a website with nanoc. I have my main index file and now
I am building a website where I have a need that user should 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.