2 minute readAutomation
On this page

Use the CleanupStalledJob tool to assist in aborting a job that otherwise cannot be aborted via the UI or command line. The job and its steps are then aborted, freeing up resources. The job is then marked for background deletion.

This tool is delivered in the form of a single .jar file on GitHub found here.

To get started, download the appropriate .jar:

  • CleanupStalledJob-jar-with-dependencies_v.10.0.2.jar: Use with CloudBees CD/RO v10.0.2 and later.

  • CleanupStalledJob-jar-with-dependencies_ver6.jar: Use with CloudBees CD/RO up to and including v10.0.1.

General usage

<installation-dir>/jre/bin/java -jar /tmp/CleanupStalledJob-jar-with-dependencies_v.10.0.2.jar [options]
<installation-dir>\jre\bin\java -jar c:\tmp\CleanupStalledJob-jar-with-dependencies_v.10.0.2.jar [options]

where options are:

--database-properties <filename>

The path to the file to use. Defaults to conf/, or to the value of the COMMANDER_DATABASE_PROPERTIES system property or environment variable.

--jobId <integer-or-uuid>

The UUID of the job to clean up.

--output <filename>

The name of a file to which output is written.

--passkey <filename>

Path to the passkey file to use. Defaults to conf/passkey, or to the value of the COMMANDER_PASSWORD_KEYFILE system property or environment variable.


Display command line help.

The steps below assume the .jar file is downloaded to /tmp (Linux) or c:\tmp (Windows).

  1. Locate the UUID of the job you wish to abort.

    1. Navigate to DevOps Essentials  Platform Home page  Jobs.

    2. Highlight and copy UUID of the job for which you want to abort. The screenshot below shows the location of the UUID for the selected job.

  2. Run the command.

    <installation-dir>/jre/bin/java -jar \
       /tmp/CleanupStalledJob-jar-with-dependencies_v.10.0.2.jar \
       - -database-properties <installation-dir>/conf/ \
       – -passkey <installation-dir>/conf/passkey \
       – -jobId “c6fa2a6a-9bed-11eb-8215-10f00530b5d8” –output “jobid123”
  3. Locate and open cleanupStalledJob.log in the directory where you ran the CleanupStalledJob command. Find the entry indicating that CleanupStalledJob was able to find the job. It looks similar to this:

    | CleanupStalledJob          | Cleaning up job c6fa2a6a-9bed-11eb-8215-10f00530b5d8
    . . .