When you execute compact on large number of databses by program document, then the compact task will run contunously untill the compaction on all databases completes.
It would be helpful if we can specify time period or number of minutes that the compact task should run on databases.
Generally, Administrators creates program document to run compaction on DBs at night time. the compaction will continue to run on the next day in business hours also due to the large size or number of databases.
In such a case, the administrator should stop the compact task manually.
if there is such an option to run compact till specific time or a specific number of minutes, then compact task will stop automatically after a specified time with stopping compact task manually.