Query on the reporter process in torq pls

41 views
Skip to first unread message

Rob Hodgkinson

unread,
Jun 25, 2024, 7:57:10 AM6/25/24
to Data Intellect kdb+/TorQ
I have a reporter process that runs at a scheduled time daily, the schedule looks like this:
name        query                         resulthandler    gateway joinfunction proctype procname start end   period timeoutinterval      daysofweek
-------------------------------------------------------------------------------------------------------------------------------------------------------
alertreport ".alert.runalerts[.z.d-1;()]" "alert_postback"         ""           hdb      hdb1     01:30 01:30 00:00  0D00:10:00.000000000 0 1 2 3 4 5 6

I have enhanced the code in alert.runalerts[] but wish to run this for specified test dates on an ad hoc basis.

How can I run this report manually (eg right now at an historic date) but without disturbing or modifying the parameters of the currently shceduled report please ?
It seems to entail the function <runreports> (in reporter.q) however I don't know what parameters to set to run it "once off" ?

I tried inputting a 'past due end time' and the report then ran on every timer cycle nonstop (before I killed it).  I just wish to run it once.

Thanks, Rob

Jack Carton

unread,
Jun 28, 2024, 4:09:00 AM6/28/24
to Data Intellect kdb+/TorQ

Hi Rob,

So the way the reporter works is that the runreports function takes the full reports table as an input to schedule all the reports.

The command that is actually set to run on the timer uses the send function which takes 6 arguments ([Name;query;proct;procn;timeout;gateway]). 

 So if I wanted to run the report immediately on 2024.05.05 as an example you could run this specific report by running send on the reporter process like -

send[`alertreport;".alert.runalerts[2024.05.05;()]";"alert_postback";enlist[`hdb];`hdb1;0D00:10:00.000000000;`]

If you look in .timer.timer on reporter process you can see what has been scheduled to run, the funcparam column shows what is actually being ran when the scheduled time occurs.

Hope this helps,

Jack

Rob Hodgkinson

unread,
Jul 1, 2024, 7:47:58 AM7/1/24
to Jack Carton, Data Intellect kdb+/TorQ
Thanks Jack, I didn’t have permission to post on the google group via browser, so just advising here.

This is great and does work (although I am using Torq4.0.x and the send[] function only takes 6 parameters (not the postback function.

But otherwise this is great and works fine, thank you very much, Regards Rob

On 26 Jun 2024, at 9:27 pm, Jack Carton <jacksuk...@gmail.com> wrote:


CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.


-- 
dataintellect.com
dataintellect.com/thoughts
--- 
You received this message because you are subscribed to a topic in the Google Groups "Data Intellect kdb+/TorQ" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kdbtorq/Br9md_fSDYk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kdbtorq+u...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/kdbtorq/2ae60cc2-c9ec-4c4d-abfa-7987c7c0ae79n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages