code: @CommandArgument
    public void cancel(int index) {
      if (jobProgressStates == null) {
        System.err.println("Server not running");
        return;
      }
      if (index <= 0 || index > jobProgressStates.size()) {
        System.err.println("Invalid job number");
      }
      ProgressState state = jobProgressStates.get(index - 1);
      state.setCancelPending();
    }
docs: Cancels a job.
  @param index The 1-based index of the job to cancel.