Click here to Skip to main content
13,297,799 members (46,729 online)
Rate this:
Please Sign up or sign in to vote.
See more:
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.

Posted 6-Dec-12 4:34am
Updated 7-Dec-12 3:41am
Rate this: bad
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.


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.
Rate this: bad
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...

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.171207.1 | Last Updated 7 Dec 2012
Copyright © CodeProject, 1999-2017
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