ralphtrent
Programmer
Hello
I have to build a windows service that will send different users a report based on their "filter". They can elect to receive thie email at any time of the day. I to keep in mind that they can request to have this sent to them as often as they like also between a start hour and an end hour. What i have implemented might not be the best way so I thought I would throw it out here for some thoughts.
What i have done
> read the db that is storing the filter
> for each row returned, create a new thread to service that filter request. I feel the need to do this because each filter may have different interval for how often to run the report or different start end times. I use a timer object and set the users defined interval to the timer.
I feel that creating multiple threads is not the best thing since I may have many filters.
Any thoughts are greatly appreciated.
Thanks,
RalphTrent
I have to build a windows service that will send different users a report based on their "filter". They can elect to receive thie email at any time of the day. I to keep in mind that they can request to have this sent to them as often as they like also between a start hour and an end hour. What i have implemented might not be the best way so I thought I would throw it out here for some thoughts.
What i have done
> read the db that is storing the filter
> for each row returned, create a new thread to service that filter request. I feel the need to do this because each filter may have different interval for how often to run the report or different start end times. I use a timer object and set the users defined interval to the timer.
I feel that creating multiple threads is not the best thing since I may have many filters.
Any thoughts are greatly appreciated.
Thanks,
RalphTrent