There are many use cases to pause jobs and have them resume, automatically or manually:
- Free resources in a local setup
- Pause a long job to let a smaller one run
- Let a job create other jobs and wait to execute until they are all finished
In all cases, the paused job should suspend its execution and free the worker thread. The operation is similar to cancel, except that it will be resumed later, so it needs to be able to do so. It is more like shutting down the server actually and resuming when starting the server again.
To support pausing, a job needs to implement proper checkpointing, similar to the TrRoutingBatch job.
The UI's executable job list component should also support pausing jobs. One can pause one or many jobs at once and each could be resumed individually or all at once. Only pending and inProgress jobs can be paused.