I want to develope a delivery application(self hosted WCF service ) which allows scheduling of the emails. User will assign a schedule to email and send it. The WCF service should be able to pick the email and send it on its scheduled time.
What approach shall I use here? I am thinking about following alternatives
- Use background worker thread to perform this task
- Any third party scheduling service (I yet to investigate on this)
Can anyone suggest me a possible solution for this apart from above mentioned two?
[Edit] : Can I use SQL Agents for this?
Thanks,
Ram
I saw the “…apart from above mentioned two…” but I think there is nothing else to achieve this 🙂
Either build an infinite loop inside of windows service like this:
… where TheThing has a method Run which does all that you need every 1 second. This looks silly (while(true) – yeah, right) but has been working non-stop since .NET 1.0 on at least 30 servers 🙂 Just make sure you call this DoTheThing method on Start of your windows service in a new thread.
Hope this helps 🙂