Hi I want to send a mail to all the customers automatically just 5 days before his licence will get expired.So I have to check the corresponding condition everyday even though I am not running the app, can I actually do it ? if yes suggest me a good way to do this.
Asked
Active
Viewed 96 times
-1
-
1There is actually many ways to achieve what you are asking for. [Azure features](http://www.hanselman.com/blog/IntroducingWindowsAzureWebJobs.aspx) and [Hangfire](http://hangfire.io/) for starters. Please consider your options and ask question with specific problem you have with chosen approach. – Paweł Hemperek Oct 12 '16 at 06:28
-
My main issue is that I want to check that condition all the time even when I am not running my application can I actually do it – Binoy Kumar Oct 12 '16 at 06:31
-
See this answer: http://stackoverflow.com/a/26264914/1220550 – Peter B Oct 12 '16 at 07:29
3 Answers
1
you can store the expired date as timestamp in database, and have a cron job running daily to check for customers that license expired in next 5 days.

exiang
- 559
- 2
- 14
1
Create one windows and write your code(logic) into it so it will send mail automatically. Run it on your system also integrate that to your application .

kunal gaikwad
- 110
- 4
-
-
yes windows service in that write your logic and compare user ex.registered with ex. todays date after 5 days count sent an email and run your service on your system 24 hours. – kunal gaikwad Oct 13 '16 at 13:06
1
Cron task, windows scheduler, windows service, node service, sql job...the list is endless.

Paul Swetz
- 2,234
- 1
- 11
- 28