Hi Julian,
As I put in a reply to the discussion that @Marykutty George linked to, you can easily get a Service to only run once at the start of each scheduled period by setting the CallInterval to a very large number so it never does a second call. /Mike
Hi. It's been a long time since I dealt with this, but when I was trying to get a stats extract to run once a day I used ADAPTER = "Ens.InboundAdapter" (with some custom params for which operation to send to and an email address) and in the production set up a schedule as described above to define a run for a few minutes each day, but then defined
update - just found that I actually used that same trick for middle of the night SQL extractions (mass update of medical instrument reference data).
and looking back at the original question: the answer is that in the ideal solution (not always the best) things should not "magically" appear in the middle of a BPL, there should be a service starting from the left sending stuff to the right in a visible path, even when the input is from "inside" the system. So here you might need that SQL adapter reading rows and sending a message per row. (Though the solution might get a lot more complex, I know mine did, with special message objects, streams and stored procedures!)
Hi,
After many years of development and support I've become wary of one-line requests. 🤔 I wonder why you need this (Five whys - Wikipedia). For example, if you are trying to debug a mysterious state in a background job then maybe you just need "D LOG^%ETN" to store the variables in the error log. Or, at least you could look in there for ways to use $ORDER and $QUERY to scan local variables without involving ^SPOOL (or, as we once did, opening a file to ZW to, closing, and then reading it back).