Click here to Skip to main content
15,888,177 members
Home / Discussions / C#
   

C#

 
AnswerRe: CSV file logging data on timer event Pin
cages29-Nov-10 10:37
cages29-Nov-10 10:37 
AnswerRe: CSV file logging data on timer event Pin
Luc Pattyn29-Nov-10 10:47
sitebuilderLuc Pattyn29-Nov-10 10:47 
AnswerRe: CSV file logging data on timer event Pin
PIEBALDconsult29-Nov-10 11:08
mvePIEBALDconsult29-Nov-10 11:08 
AnswerRe: CSV file logging data on timer event Pin
Pete O'Hanlon29-Nov-10 11:13
mvePete O'Hanlon29-Nov-10 11:13 
QuestionPrinting from a C# application Pin
memorexr29-Nov-10 8:58
memorexr29-Nov-10 8:58 
AnswerRe: Printing from a C# application Pin
Henry Minute29-Nov-10 10:32
Henry Minute29-Nov-10 10:32 
GeneralRe: Printing from a C# application Pin
Luc Pattyn29-Nov-10 11:09
sitebuilderLuc Pattyn29-Nov-10 11:09 
QuestionA service to process scheduled tasks PinPopular
musefan29-Nov-10 4:46
musefan29-Nov-10 4:46 
Hi all,

This is not so much a technical question but rather to get the opinion of others with regards to a solution I require.

For the sake of simplicity, lets say I have a database table will a list of scheduled emails - this table contains a schedule date/time and the content of the email to send. These scheduled emails can be created, modified and delete at any time.

My initial thoughts on achieving this is to create a Windows Service (I think this is better than a IIS hosted WCF Service because of the need for timers - maybe I am wrong?). This service will then query the DB table at regular intervals and send any emails that need sending.

But how best to handle the timing? I want the scheduled emails to be sent as close to the correct scheduled time as possible but at the same time I want to limit the querying of the DB (i.e. not every second)

I also thought about notifying the service when a new task is scheduled and then setting a timer up there and then based on the difference between current time and scheduled time. This however may lose precision. Also, what if a scheduled email is modified/deleted? Also, doesn't seem best for schedules of a long time (e.g. a day, a week or a month even)

Any opinions are welcome

Thanks
Life goes very fast. Tomorrow, today is already yesterday.

AnswerRe: A service to process scheduled tasks Pin
#realJSOP29-Nov-10 4:50
mve#realJSOP29-Nov-10 4:50 
GeneralRe: A service to process scheduled tasks Pin
musefan29-Nov-10 5:21
musefan29-Nov-10 5:21 
GeneralRe: A service to process scheduled tasks Pin
#realJSOP29-Nov-10 6:00
mve#realJSOP29-Nov-10 6:00 
GeneralRe: A service to process scheduled tasks Pin
musefan29-Nov-10 6:09
musefan29-Nov-10 6:09 
AnswerRe: A service to process scheduled tasks Pin
Luc Pattyn29-Nov-10 5:01
sitebuilderLuc Pattyn29-Nov-10 5:01 
GeneralRe: A service to process scheduled tasks Pin
musefan29-Nov-10 5:33
musefan29-Nov-10 5:33 
AnswerRe: A service to process scheduled tasks Pin
Luc Pattyn29-Nov-10 6:35
sitebuilderLuc Pattyn29-Nov-10 6:35 
GeneralRe: A service to process scheduled tasks Pin
musefan29-Nov-10 6:43
musefan29-Nov-10 6:43 
GeneralRe: A service to process scheduled tasks Pin
Luc Pattyn29-Nov-10 6:52
sitebuilderLuc Pattyn29-Nov-10 6:52 
GeneralRe: A service to process scheduled tasks Pin
Huw Leonard30-Nov-10 5:42
Huw Leonard30-Nov-10 5:42 
GeneralRe: A service to process scheduled tasks Pin
Jason Christian30-Nov-10 12:20
Jason Christian30-Nov-10 12:20 
AnswerRe: A service to process scheduled tasks Pin
YannickJost29-Nov-10 21:49
YannickJost29-Nov-10 21:49 
AnswerRe: A service to process scheduled tasks Pin
Rob Philpott29-Nov-10 5:49
Rob Philpott29-Nov-10 5:49 
GeneralRe: A service to process scheduled tasks Pin
musefan29-Nov-10 6:00
musefan29-Nov-10 6:00 
GeneralRe: A service to process scheduled tasks Pin
Mycroft Holmes29-Nov-10 22:02
professionalMycroft Holmes29-Nov-10 22:02 
GeneralRe: A service to process scheduled tasks Pin
musefan29-Nov-10 22:30
musefan29-Nov-10 22:30 
AnswerRe: A service to process scheduled tasks Pin
PIEBALDconsult29-Nov-10 14:26
mvePIEBALDconsult29-Nov-10 14:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.