Mister Anderson. .
I am going to answer based on the assumption that you are using ESP, also because we use ESP here. Perhaps, you can use these concepts in whatever scheduler you are using.
The simplest way to do this is to use a self completing task to clean up the application by force completing everything. This task uses an AJ command, and can be scheduled however you like. I use these, sometimes, to automatically clean up a generation of an application right before the event is due. So for example, the cleanup task cleans up the application at 11:59, and the event triggers at midnight. Here is an example:
JOB CLEANUP TASK SELFCOMPLETING
RUN DAILY
DELAYSUB 17:30
ESP AJ ALL COMPLETE APPL(%ESPAPPL..%ESPAPGEN)
ENDJOB
You could add some CLANG to the run statement of this type of task, like this:
IF ESPAHH > '7' and ESPAHH < '19' Then Delaysub 19:00
Hope this helps!
<JC>