Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#ASP.NET
Hi All,
 
In my website i want to give a Auto Renew feature to renew membership of users. I have function to auto renew the user. I want some solution for calling this function after 1 year from his registration date.
 
I am taking the registration date from the database. Now i want some mechanism to call this function each day at specific time to check all users whose subscription is expired. If there are users then renew there subscription.
 
Please suggest me to do this in proper way.
 
Forgot to inform you that i am publishing my website on windows Azure platform.
 

Thanks.
Posted 6-Dec-12 3:34am
Edited 7-Dec-12 2:41am
v4
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

There are different ways you can achieve this. Some of which are
 
1) You can write a SQL Server Job and schedule it to run daily to check users whose subscriptions has expired and auto-renew it. But you will require permissions to do this in your Database. Contact your DBA for the permissions. Check this link to learn on how to schedule a Job.
http://msdn.microsoft.com/en-us/library/ms191439.aspx
 
or
 
2) Write a console application which will interact with the Database and do the similar job. You can schedule your exe using the Task Scheduler in Windows. The Link below explains how to create a scheduled taks in Windows 7.
http://windows.microsoft.com/en-US/windows7/schedule-a-task
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Some web providers do provide timer that can be used to "call" a web page. I do that with ISQ Solutions.
 
Alternatively, if your server is used a lot and the exact time is not an issue, you might simply check the time when you receive a request and do the processing after responding to the request if desired.
 
If it is your own server, then you can do whatever you want...
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 442
1 sanket saxena 355
2 Abhinav S 268
3 OriginalGriff 250
4 CPallini 205
0 Sergey Alexandrovich Kryukov 8,497
1 OriginalGriff 4,850
2 Peter Leow 3,839
3 Maciej Los 3,535
4 Er. Puneet Goel 3,107


Advertise | Privacy | Mobile
Web03 | 2.8.140415.2 | Last Updated 7 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid