Steps to reproduce:
- configure a process engine with a batch window (e.g. start at 10:00 am and end at 12:00 am)
- start process engine somewhere in between the configured batch window (e.g. at 10:05 am)
Problem:
- The history cleanup job is scheduled for tomorrow at 10:00 am
- Cockpit is showing that the cleanup job is currently running which indeed is not the case
Expected behavior:
If we're inside batch window at the moment when the engine starts, then the cleanup job is scheduled to be executed at once.