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