Skip to main content
Skip table of contents

Manage the Job Queue

You can check the status of jobs that have been submitted to Job Queue Manager by querying the database directly.

You can also use direct database access to remove failed jobs from the queue, change the job priority, and restart failed jobs. Follow these guidelines when directly accessing the database:

  • Do not update a job that is in the RUNNING state.
  • Do not update or otherwise modify the "queuedjob" "VERSIONNUM” as it is a reserved field.
  • Do not update or otherwise modify the "queuedjob" "RESULT" as it is a binary data field.

Job Queue Statuses

To see all jobs and their current status, view the QueuedJob table and check the Status column:

The possible Status values are as follows:

StatusDescription

SUBMITTED

The system has saved the job in the database but has not yet set its priority.

SCHEDULED

The system has calculated the priority of the job and scheduled it for processing.

RUNNING

The system is currently processing this job.

COMPLETE

The system has processed the job and the result is ready for download.

COLLECTED

The user who created the job has downloaded the result at least once.

RECOVERABLE

An error occurred while processing the job but the job may succeed when the problem is resolved. For example, the Space-Time Research data server was down at the time the system tried to process the job.

ERROR

An error occurred while processing the job and the job is unlikely to succeed if the system tries to run it again. For example, a job that needs a database that is not present on the system will not succeed until someone installs the missing database.

As an administrator, you should regularly check for the job queue for errors and for jobs that are stuck in the SUBMITTED state (a job should not be in this status for more than a few seconds).

A job in the ERROR state requires manual intervention by the administrator. Otherwise, it will remain in the ERROR state forever. Check the StatusDetails column and the ErrorDetails table for information about the cause of the error. See the troubleshooting section for help resolving errors.

Job Queue Priorities

Job Queue Manager automatically calculates a priority for each job when it is added to the database. The priority is a positive numeric value that is used to determine which jobs get executed first: jobs with a higher priority number are executed first.

You can review the priority for existing jobs by checking the Priority column.

Restart a Failed Job

If you have resolved the issue that caused a job to fail, you can restart the job by changing the job status in the database to SCHEDULED, for example using a SQL statement similar to the following:

SQL
UPDATE queuedjob SET status='SCHEDULED', priority=<priority> where queuedjob.id=<jobid>;

Replace <priority> with the job priority and <job_id> with the ID of the job being rescheduled.

Restart All Failed Jobs

To restart all jobs in the ERROR state without changing their priorities, you could use the following SQL statement:

SQL
 UPDATE queuedjob SET status='SCHEDULED' where queuedjob.status='ERROR';

Delete Failed Jobs

To remove all jobs in the ERROR state, you could use the following SQL statements:

SQL
delete from tablelabeldefinition where queuedjob_id=(SELECT id from queuedjob where queuedjob.id=tablelabeldefinition.queuedjob_id and queuedjob.status='ERROR');
delete from tablesortingdefinition where queuedjob_id=(SELECT id from queuedjob where queuedjob.id=tablesortingdefinition.queuedjob_id and queuedjob.status='ERROR');
delete from tabletotaldefinition where queuedjob_id=(SELECT id from queuedjob where queuedjob.id=tabletotaldefinition.queuedjob_id and queuedjob.status='ERROR');
delete from errordetails where queuedjob_id=(SELECT id from queuedjob where queuedjob.id=errordetails.queuedjob_id and queuedjob.status='ERROR');
delete from queuedjob where queuedjob.status='ERROR';
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.