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
0 Sergey Alexandrovich Kryukov 861
1 OriginalGriff 410
2 CPallini 255
3 Volynsky Alex 205
4 Richard Deeming 175
0 OriginalGriff 5,540
1 Sergey Alexandrovich Kryukov 4,668
2 CPallini 4,540
3 George Jonsson 3,102
4 Gihan Liyanage 2,445


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

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100