Purging a CREAM job means removing it from the CREAM database and removing from the CREAM CE any information relevant for that job (e.g. the job sandbox area).

When a job has been purged, it is not possible to manage it anymore (e.g. it is not possible to check anymore its status).

A job can be purged:

  • Explicitly by the user who submitted that job, using e.g. the glite-ce-job-purge command provided by the CREAM CLI (see section 3.9 of the CREAM user's guide).
  • Automatically by automatic CREAM job purger, which is responsible to purge old - forgotten jobs, according to a policy specified in the CREAM configuration file (/opt/glite/etc/glite-ce-cream/cream-config.xml).
This policy is specified by the attribute JOB_PURGE_POLICY
For example, if JOB_PURGE_POLICY is the following:
<parameter name="JOB_PURGE_POLICY" value="ABORTED 1 days; CANCELLED 2 days; DONE-OK 3 days; DONE-FAILED 4 days; REGISTERED 5 days;" />
then the job purger will purge jobs which are:
  • in ABORTED status for more than 1 day
  • in CANCELLED status for more than 2 days
  • in DONE-OK status for more than 3 days
  • in DONE-FAILED status more than 4 days
  • in REGISTERED status for more than 5 days

For jobs submitted to a CREAM CE through the WMS, the purging is done by the ICE component of the WMS when it detects the job has reached a terminal status. The purging operation is not done if in the WMS conf file (/opt/glite/etc/glite_wms.conf) the attribute purge_jobs in the ICE section is set to false.

A user can purge only jobs she submitted. Only a CREAM CE admin can purge jobs submitted by other users.

Purging jobs in a non-terminal status

The (manual or automatic) purge operation can be issued only for jobs which are in a terminal status. If it is necessary to purge a job which has been terminated but which is for CREAM in a non terminal status (e.g. RUNNING, REALLY_RUNNING) because of some bugs/problems/..., a specific utility (JobAdminPurger) can be used.

This utility can be used simply downloading the 2 files from here and copying them together in a directory.

JobAdminPurger allows to purge jobs based on their CREAM jobids and/or their status (considering how long the job is in that status).


JobDBAdminPurger.sh [-c|--conf CREAMConfPath] -u|--userDB userDB -p|--pswDB pswDB [-j|--jobids jobId1:jobId2:...] | [-f|--filejobIds filenameJobIds] | [-s|--status statusType0,deltaTime:statusType1:...] [-h|--help]


  • -c | --conf : the CREAM conf file (to be specified only if it is not the standard value /opt/glite/etc/glite-ce-cream/cream-config.xml
  • -u | --userDB: the cream DB user (as specified in the /etc/tomcat5/Catalina/localhost/ce-cream.xml file
  • -p | --pswDB: the cream DB password (as specified in the /etc/tomcat5/Catalina/localhost/ce-cream.xml file
  • -j | --jobids: the IDs (list of values separated by ':') of the jobs to be purged
  • -f | --filejobIds: the file containing a list of jobids (one per line) to be purged
  • -s | --status: the list of state,deltatime (list of values separated by ':') of the jobs to be purged. A job is purged if it is in specified state for more that deltatime days. deltatime can be omitted (which means that all jobs in that status will be purged). The possible states are:
    • IDLE
    • HELD
    • DONE-OK
    • PURGED


JobDBAdminPurger.sh -u xyz -p abc -j CREAM217901296:CREAM324901232

JobDBAdminPurger.sh -u xyz -p abc -s registered:pending:idle

JobDBAdminPurger.sh u xyz -p abc -s registered,3:pending:idle,5

JobDBAdminPurger.sh u xyz -p abc -f /tmp/jobIdsToPurge.txt

Please note that this script should be run just to clean the CREAM DB in case of problems (i.e. jobs reported in a non terminal status while this is not the case)

Please also note that this script purges jobs from the CREAM DB. The relevant job sandbox directories are also deleted