Hi Chris,
I agree - note the Schedular basically STARTS or STOPS a business host automatically, on a pre-defined schedule - (so it applies to Operations and Processes too, not just Services, which are the items that have a CallInterval feature).
For regular invocations of work on services, in almost all cases, absolutely - CallInterval is the way to go, and is what is used mostly. I certainly would prefer looking at the production and status of my business hosts and see all of them 'green' and running - even though, running might actually means 'idle in between call intervals' . Using the Schedular the stopped business host will appear 'gray' when it is not started (ie, it is disabled)
There are valid use cases - though, a Schedule on, say, a Business Operation makes sense. For example, you may want to send out messages to business operation that interacts with a fee-per-transaction end point that is cheaper during certain times of the day. In this case, you can disable the operation, send queue it messages all day (which will accumulate in it's queue), then, at the appropriate time, enable the business operation via the schedular, then, disable it again after a period of choice.
In this thread's case, the easiest approach is to use OnInit to prepare the data and send the data. OnProcessInput (called by the interval, which can be very long), would do nothing but quit. That would work. Of course there are other approaches.
I wanted to include the Schedular information as it is often overlooked, and, sometimes, the full story and use case of the original poster might not be evident, and, schedular might have been appropriate.
Thanks for your feedback.
Steve
- Log in to post comments