locked
Help needed creating a reminder web application RRS feed

  • Question

  • User256397534 posted

    Hello,

    I am trying to create a asp.net website where people will enter their own important events like birthday, important meeting, e.t.c. at various dates and times. Then they will sign out or close the webpage. At specific date and time my application will send them an email and a sms. I know how to configure to send email and sms but i am unsure about the structure of the application. Should i create a webservice? But webservice needs to be called. How my application will tract each second and send email or sms? Please guide me. If there is any tutorial or video then pleare post here.

    Pardon me if my question is in wrong place.

    Thanks.

    Monday, December 21, 2009 7:07 PM

Answers

  • User-1071856410 posted

    Hi shaoun1000,

                             You can create a Windows service or just an exe which checks the Database for upcoming events and send email or sms to the users. If you are creating an exe, You can use Windows task scheduler to schedule it to run in a given interval at the server.

    If you are using a windows service, You can set up your service to execute code at regular intervals by using a timer.

    Some examples:

    http://www.15seconds.com/issue/021007.htm

    http://social.msdn.microsoft.com/forums/en-US/adodotnetdataproviders/thread/b4fa8e1f-0b67-495e-944a-8e06c1a73d66

    http://stackoverflow.com/questions/922444/how-to-schedule-a-c-windows-service-to-run-a-method-daily

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, December 21, 2009 11:05 PM
  • User-952121411 posted

    If you find that you can install a Windows Service on the server, then this is the best way to go.  Windows Services are built to run as background workers that don't really sleep and are always running.  This is the ultimate hosting environment for stable periodic processing.  Other than the server shutting down, you don't have to worry to much about the stability or consistency of the service once started successfully.  If you can do this, check out the following link for a good method of building this type of service:

    Running a Periodic Process in .NET using a Windows Service:

    http://allen-conway-dotnet.blogspot.com/2009/12/running-periodic-process-in-net-using.html

    Now, if you look at the previously provided link from CodeProject about mimicking a windows service type app in ASP.NET, you basically have to ignore all of the statements I made above about a Windows Service, because an ASP.NET app was not designed to behave like that.

    Session expiration, cache issues, IIS restarts, ASPNET worker recycling, and the list goes on of stability issues that can arise with using an ASP.NET app that attempts to always stay 'alive'; and never shut down.  Unfortunately in a hosted environment you may not have much of a choice.  Just looking at that CodeProject link, look at all the feedback of issues people have had trying to implement that architecture.  You may also want to look into an alternative, where sites provided this functionality online:

    http://webbasedcron.com/

    http://scheduler.codeeffects.com/

    So overall, if you attempt to do this in an ASP.NET web app, be prepared for some challenges.  If the process you are attempting to create is that critical and important, you may want to look into getting a server that you have permission to install a Windrows Service or use an alternative such as the links above provide.

    Hope this helps! Smile

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, December 24, 2009 1:31 AM

All replies

  • User-1071856410 posted

    Hi shaoun1000,

                             You can create a Windows service or just an exe which checks the Database for upcoming events and send email or sms to the users. If you are creating an exe, You can use Windows task scheduler to schedule it to run in a given interval at the server.

    If you are using a windows service, You can set up your service to execute code at regular intervals by using a timer.

    Some examples:

    http://www.15seconds.com/issue/021007.htm

    http://social.msdn.microsoft.com/forums/en-US/adodotnetdataproviders/thread/b4fa8e1f-0b67-495e-944a-8e06c1a73d66

    http://stackoverflow.com/questions/922444/how-to-schedule-a-c-windows-service-to-run-a-method-daily

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, December 21, 2009 11:05 PM
  • User256397534 posted

    Thanks for your reply. Those are very helpful. Just one doubt, if i create a windows service how i will install that in server. As i will rent a specific space in server, is it possible to install an application through Plesk Control panel or somehow else?

    And also how i will use windows task sheduler in server? Please guide me.

    Thanks.


    Tuesday, December 22, 2009 12:24 AM
  • User-1071856410 posted

     if i create a windows service how i will install that in server. As i will rent a specific space in server, is it possible to install an application through Plesk Control panel or somehow else?

    And also how i will use windows task sheduler in server? Please guide me.

    Usually on a shared hosted environment, we do not have the permission to deploy our own Windows service to our hosting provider's web server. I think you must be having a dedicated server for that purpose.

    If you are using a shared hosting environment, here is an alternative way to schedule tasks by simulating a windows service using ASP.Net.

    Simulate a Windows Service using ASP.NET to run scheduled jobs

    Wednesday, December 23, 2009 11:44 PM
  • User-952121411 posted

    If you find that you can install a Windows Service on the server, then this is the best way to go.  Windows Services are built to run as background workers that don't really sleep and are always running.  This is the ultimate hosting environment for stable periodic processing.  Other than the server shutting down, you don't have to worry to much about the stability or consistency of the service once started successfully.  If you can do this, check out the following link for a good method of building this type of service:

    Running a Periodic Process in .NET using a Windows Service:

    http://allen-conway-dotnet.blogspot.com/2009/12/running-periodic-process-in-net-using.html

    Now, if you look at the previously provided link from CodeProject about mimicking a windows service type app in ASP.NET, you basically have to ignore all of the statements I made above about a Windows Service, because an ASP.NET app was not designed to behave like that.

    Session expiration, cache issues, IIS restarts, ASPNET worker recycling, and the list goes on of stability issues that can arise with using an ASP.NET app that attempts to always stay 'alive'; and never shut down.  Unfortunately in a hosted environment you may not have much of a choice.  Just looking at that CodeProject link, look at all the feedback of issues people have had trying to implement that architecture.  You may also want to look into an alternative, where sites provided this functionality online:

    http://webbasedcron.com/

    http://scheduler.codeeffects.com/

    So overall, if you attempt to do this in an ASP.NET web app, be prepared for some challenges.  If the process you are attempting to create is that critical and important, you may want to look into getting a server that you have permission to install a Windrows Service or use an alternative such as the links above provide.

    Hope this helps! Smile

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, December 24, 2009 1:31 AM