Focal Point
SOLVED - Help. how to schedule multiple .fexs to run in succession

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

January 03, 2017, 10:27 AM
Reiter
SOLVED - Help. how to schedule multiple .fexs to run in succession
Greetings,

I am looking for help with scheduling multiple .fex files to run in succession. The multiple .fex reports I'm running all save to an application directory and are used as a type of ODS for speed reasons.

anyway, looking for a way to do this so I can schedule all the "pre load" reports to run on the first of the month without human intervention and without having to create a schedule for each of the 10+ reports (.fex)

Thank you very much.
~R

This message has been edited. Last edited by: Reiter,


WebFOCUS 8.1.0.5 DS, learning AS
Windows, All Outputs
January 03, 2017, 11:51 AM
RSquared
Have you tried creating one RC job with multiple tasks ?


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
January 03, 2017, 12:07 PM
jcannavo
Hi,

Like RS mentioned, you can add tasks via RC. Easiest way, if using RC GUI, you can choose to schedule your middle FEX and click the Pre/Post-RPC button to add the pre and post processing FEXes.


JC
WebFOCUS Dev Studio / App Studio
8.2.01
Windows 7
January 03, 2017, 12:29 PM
j.gross
In broad strokes:

Set up a daily RC job, which will check whether there is anything to do today. If not, end the job, and repeat tomorrow.

If today's the day (or yesterday was the day but the report set was not completed), the job will run a single report out of the series of N, and reschedule itself to run the next remaining report.

More specifically:

Create and populate a control file, with the data row keyed to run_date (the date on which successive monthly runs are to take place), and containing two integer fields, both initially zero: last_report_completed, and report_currently_running.

Your pre-process step locates and holds the row with maximal run_date <= the current date, transfers the run_date and two counter fields of that row into amper vars, and inspects the two counters.

If &last_report_completed >= N, there is nothing remaining to do, and just kill the job.

otherwise,
-- if &report_currently_running > 0 (so a report is already underway), reschedule the next run time to 10 minutes hence, and kill this run.

otherwise (&report_currently_running is zero):
-- set &report_currently_running = last_report_completed + 1
-- update the control table row accordingly
allow the main task to run (see more below)
and in post-processing
-- set &last_report_completed = &report_currently_running
-- set &report_currently_running = 0
-- update the control table row accordingly
-- if &last_report_completed < N, reschedule the next run time to 1 minute hence.

main task fex is a driver for the N reports. It will branch to the label corresponding to &report_currently_running, which leads to a -INCLUDE of the respective report's fex, and then branches to end of the driver.


- Jack Gross
WF through 8.1.05
January 03, 2017, 02:05 PM
jcannavo
Quite the solution above from Jack, but I think your best bet is just to create the schedule, then edit and add tasks pointing to the additional FEXes as needed.


JC
WebFOCUS Dev Studio / App Studio
8.2.01
Windows 7
January 05, 2017, 02:40 PM
Reiter
adding more tasks worked. Seems a bit clunky to have to save the schedule first. Then close it and open it again to be able to have the ability to add more tasks.

Anyway, case closed. thanks everyone.


WebFOCUS 8.1.0.5 DS, learning AS
Windows, All Outputs