Focal Point
[SOLVED] Output RC Job Status

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/9387088436

November 25, 2013, 03:00 PM
BobSh
[SOLVED] Output RC Job Status
Does anyone know if there is a way to output the ReportCaster schedules to disk that are currently running (visible from the Job Status option)? We want to write a program to monitor schedules and it would be helpful to know if a schedule is currently running.
Thanks,
Bob

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 7.7.05M, gen 144, Windows 2008 Server R2 64-bit, Tomcat 6.0.33, IIS 7.0, SQL Server, Excel 2013, PDF, HTML, FOCUS files.
November 25, 2013, 04:17 PM
susannah
yes, there are BOTSCHED or BOTSKED files
its been way too long since i've done this so i can't find my code
but if you are using focus files for your caster repository, then poke around in your report caster directory until you find them.
i wrote an article once about this for Tips&Tech, but ages ago. don't know if its still there,
ah... search for an article on 'Zulu time'




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
November 26, 2013, 10:08 AM
BobSh
I don't think that will provide what we need. I'm very familiar with BOTSCHED but it only tells what is scheduled. We need to know what was started by ReportCaster and that is still currently running. I don't believe BOTLOG or BOTLOG2 are updated until the schedule completes. So there is a period where the NEXT RUN TIME has been updated but the logs from the run have not yet been written. If there was an abort, the logs may not be written at all.


WebFOCUS 7.7.05M, gen 144, Windows 2008 Server R2 64-bit, Tomcat 6.0.33, IIS 7.0, SQL Server, Excel 2013, PDF, HTML, FOCUS files.
November 26, 2013, 11:48 AM
Tony A
I did something like this about 5 years ago, can't remember specifics but something like grabning schedule details due to be run within the next "n" minutes and place them in a database and then update a field from details in BOTLOG and BOTLOG2 when these logs become available.

Not the simplest of processes but satisfying once you've got it.

I'll check my archives to see if I have some code.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
November 27, 2013, 11:43 AM
susannah
oh, i see.
well, you can use the agent directories, then.
use a routine that writes a little .txt file into the job's agent directory. (tony & I did a prez on this at summit, dtls later if you want).
-WRITE into that wee .txt file whatever info you need, like time started, fexname, yes its a caster job, etc).
then write a little routine to read the current stack of agent directories, looking for ones that have a .txt file of some certain name. (you're in windows, so that's doable, using CMD DIR > somefilename ).
Agita, si, but if it sounds like something you want to tackle, holler back and we'll help you.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
November 27, 2013, 11:45 AM
susannah
or how about this....
as a pre-processing condition on your caster job, write a record to some db (as T suggests), or create a wee .txt file and park it in some app directory. then, as a post-processing condition, either write another record to that same txt file , with say the time elapsed, or just nuke that .txt file.
oh, i'm liking this better, very simple. At any point in time you can just look at whatever directory you park these things in, and see whats running.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
November 27, 2013, 01:04 PM
BobSh
That sounds like the easiest approach. I'll give that a try. Thanks Tony and Susannah for your ideas!


WebFOCUS 7.7.05M, gen 144, Windows 2008 Server R2 64-bit, Tomcat 6.0.33, IIS 7.0, SQL Server, Excel 2013, PDF, HTML, FOCUS files.