Call a method at a certain time

2019-07-03 07:59发布

问题:

I am developing an application that has a small feature of sending some SMS messages and Emails using some external web services.

These messages can be scheduled to be sent right now or in the future on a certain date at a certain time. They can also be scheduled to be sent every day/week/month.

How can I design my system to "know" when to call the sending method (without polling)?

回答1:

You can use Quartz.net for task schedule. http://quartznet.sourceforge.net/

You can use this with windows service.



回答2:

Or you have to use a kind of "External Scheduler" - which means - to use external polling, or to implement scheduler by yourself. I think that there's no any decisions without any polling at all...