|
musefan wrote: maybe there will be more to this service to come
You can burn that bridge after you've crossed it.
|
|
|
|
|
Dunno if this was suggested to you already, but in my opinion the only way to solve your problem without having to go through some kind of polling is by using triggers.
If your DB server allows you to execute compiled code in triggers you're the winner, since you can then signal your service upon insertion/deletion/update and adjust your schedule timer accordingly.
SQL Server can execute .NET code in triggers (see http://www.15seconds.com/issue/041006.htm[^] for example).
Good luck.
2+2=5 for very large amounts of 2
(always loved that one hehe!)
|
|
|
|
|
Have a look at NServiceBus or Rhino Service Bus. They do exactly what you want.
|
|
|
|
|
I think a dual approach should work.
Use the first job to look only for "unqueued" mails, and move them to a service, which is always on, that way you get the course grained (say next 15 minutes of) work and send the items to the service that can handle the next 900 seconds.... and you can then dynamically set the sleep in the service, to reduce cpu usage, or use the "down time" to see if any new items have been added/ get a leg up on the next cycle... this way if you really want you can ping or reschedual the Job from your service at will. (set it and.. Forget it.. )
I'd blame it on the Brain farts.. But let's be honest, it really is more like a Methane factory between my ears some days then it is anything else...
-----
"The conversations he was having with himself were becoming ominous."-.. On the radio...
|
|
|
|
|
I have had a lingering project with this type of feature. Unfortunately it is always pushed down the priority scale so I haven't implemented a solution.
However, I found are two very potential ways of handling it nicely. They seem to be a lot better than plain old Windows Scheduler or SQL jobs since you can write almost any .Net code you want for it. These are not in any particular order.
1) [Windows Workflow] - This has come a long way and might really work out for you.
2) [Quartz]- Open source enterprise job scheduler. I really want to try out this one. You can can even scale it across multiple servers if you wanted to. Seems pretty robust and has been around for a while. Built on top of .Net so it's definitely something you can probably dive into.
Let us know what you end up using. I'd really like to hear how it turned out.
|
|
|
|
|
from my c# code mail is send to few people but one people getting the same copy twice. i am very confuse about this situation why only one people getting the email of same copy twice when he downloads email from outlook. any idea please......!
thanks
tbhattacharjee
|
|
|
|
|
If you send by group, perhaps this people is in 2 group ?
If other people receive only once the mail, a one people twice. I think it is because this people appear twice in your sending.
|
|
|
|
|
Can you provide some code or tell us how the users register to get added to the distrubtion list? As it stands it coud be one of 100s of things!
|
|
|
|
|
Tridip Bhattacharjee wrote: from my c# code mail is send to few people but one people getting the same copy twice.
you should provide your Code in which problem is occur,
then we can easily manipulate what is problem.
otherwise it is very hard to say what is problem.
|
|
|
|
|
Just what Keith said almost three hours before you. Read the responses already given before adding to the discussion.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
|
Are you kidding me, your last question was posted less than 2 hours ago and sounds like you're trying to hack.
|
|
|
|
|
|
My apologies. Maybe you could try
while (MessageBox.Show("Turn off your monitor now", "Secret Programmers Business", MessageBoxButtons.YesNo) == DialogResult.No) { };
Hope that helps
Seriously though, you can't turn off someones monitor. As a programmer, you need to analyse the problem and suggest a better solution
|
|
|
|
|
Thank you for the answer. I know this is not an elegant solution, but you don't know my boss... Anyway I will manage it somehow... Good job
|
|
|
|
|
Do you honestly think that we are all sitting here 24/7 just waiting for you to ask a question, so that we can rush to answer it?
Get real!
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
I think I was misunderstood ... I was not expecting an immediate response, I just wanted to ask the question differently because I realized that my previous request is not feasible. all.
Perhaps my poor English can create these misunderstandings...sorry again.
|
|
|
|
|
It sounds very like you are trying to hack a system and our help isn't quick enough. It's pretty rude to bump your question like this.
|
|
|
|
|
Can you alter the program you are interacting with?
|
|
|
|
|
No, unfortunately I can't. It's a web page remotely sent by a clima controller inside a hotel. This the reason why I use a 'bot'. I didn't find other solutions.
|
|
|
|
|
If it's a web page, you might be able to make direct HTTP request/responses, without even having the browser open. Is this an option?
|
|
|
|
|
Thank you, but this is not an option, we just used a "sniffer" and did not intercept traffic
|
|
|
|
|
just to clarify, did the sniffer not intercept anything, or did the site not accept sniffed traffic?
If it is the former, there is something wrong with the sniffer: there must be traffic between the site and the browser .
|
|
|
|
|
The site did not accept sniffed traffic. Sorry, my mistake.
|
|
|
|
|
Just throwing out ideas: Can you host the web-page in a .net WebBrowser control? You can interact with DOM elements in it IIRC, and you might not need to render it. It's a brittle solution though, a change to the web site can smash the functionality.
|
|
|
|