locked
Automated email lists RRS feed

  • Question

  • User-1001813206 posted

    Hi all,

    I need to send an automated email to a user when they win an auction. The auctions do not end as such, they are removed once an "endDate" has arrived. once the end date (which is a column stored as date time in the database) arrives, i need to email the winner, who's name is displayed on the auction user control page.  The email of each user is stored on a separate database in a "membership" table.

    Regards

    Tuesday, March 16, 2010 10:54 AM

Answers

  • User-525215917 posted

    If you have a real site that is accesed by people , you can use http://www.mikesdotnetting.com/Article/129/Simple-task-Scheduling-using-Global.asax

    Don't use something like this for scheduled tasks. Never, never, never! Threads stared by your web application will not run forever. Your web application runs as instance under IIS and IIS decides when your application is loaded and when your application must be unloaded. IIS knows nothing about your long running threads and it doesn't care what they do. If your application must be unloaded the it will be unloaded and that's it. It is okay btw because IIS must work as optimal as possible and scale maximally. 

    What you need here is Windows application that is run by Task Scheduler or Windows service. Take one of these and live happy life :)

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, March 21, 2010 5:07 AM

All replies

  • User2130758966 posted

    Sounds like you need to setup a scheduled task to run every xx minutes and check if any auctions need processing.


    One of these options should get you started on the right track...

    Tuesday, March 16, 2010 12:04 PM
  • User197322208 posted

    once the end date (which is a column stored as date time in the database) arrives, i need to email the winner

    If you have a real site that is accesed by people , you can use http://www.mikesdotnetting.com/Article/129/Simple-task-Scheduling-using-Global.asax

    Other solution - your hosting provider can have a control panel to run various things - including web pages - at various interval.

    Or you can use a windows service(or command line application )- that you beg your hosting to install (or put into task scheduler)


    Tuesday, March 16, 2010 12:04 PM
  • User-1001813206 posted

    Hey,

    I'm using sql server express so i dont think i can do it from there. My auctions are displayed in user controls but they need to email the high bidder when end time reaches now. can this be done from the code behind? 

    Saturday, March 20, 2010 11:06 AM
  • User-525215917 posted

    If you have a real site that is accesed by people , you can use http://www.mikesdotnetting.com/Article/129/Simple-task-Scheduling-using-Global.asax

    Don't use something like this for scheduled tasks. Never, never, never! Threads stared by your web application will not run forever. Your web application runs as instance under IIS and IIS decides when your application is loaded and when your application must be unloaded. IIS knows nothing about your long running threads and it doesn't care what they do. If your application must be unloaded the it will be unloaded and that's it. It is okay btw because IIS must work as optimal as possible and scale maximally. 

    What you need here is Windows application that is run by Task Scheduler or Windows service. Take one of these and live happy life :)

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, March 21, 2010 5:07 AM