getAllJobs

First introduced in version: 2.00.19/3.00.6

Syntax

getAllJobs()

Details

Returns information about batch jobs submitted and on the current node through scheduleJob/submitJob/submitJobEx/submitJobEx2.

This function reads job records from the batchJob.log file. As a result, it can retrieve not only jobs submitted during the current server runtime, but also historical jobs submitted before a server restart.

Compared with getRecentJobs, getAllJobs can query historical job information before a restart, and the returned result does not include the rootJobId field.

Note:

  • The admin user can view jobs submitted by all users; regular users and the guest user can only view their own jobs.

  • If job result files are cleaned up, a new job instance with the same jobId may be generated when the server restarts. Different instances have different receivedTime values and are retained as multiple rows in the query result.

Parameters

None.

Returns

Returns a table with the following columns:

Column Name

Type

Description

node STRING The alias of the current node
userID STRING The username of the user who submitted the job.
jobId STRING The ID of the job.
jobDesc STRING The description passed when the job was submitted.
priority INT The priority of the job which is marked as integers ranging from 0 to 9.
parallelism INT The job parallelism, i.e., the maximum number of jobs that can run in parallel.
clientIp STRING The client IP address from which the job was submitted.
clientPort INT The client port from which the job was submitted.
receivedTime TIMESTAMP The time when the job was received, in milliseconds.
startTime TIMESTAMP The time when the job started execution; NULL if execution has not started.
endTime TIMESTAMP The time when the job completed; NULL if the job has not completed.
errorMsg STRING The exception message of a failed job; an empty string for a successful job.

Examples

Query historical job information.

submitJob("job1", "now", now)
getJobReturn("job1")
// output: 2026.06.11 16:18:59.911
getAllJobs()

node

userID

jobId

jobDesc

priority

parallelism

clientIp

clientPort

receivedTime

startTime

endTime

errorMsg

local11454 guest job1 now 0 1 192.168.1.193 49479 2026.06.11 16:18:59.909 2026.06.11 16:18:59.911 2026.06.11 16:18:59.911

Example 2: Query historical records after deleting job results.

submitJob("job3", "now", now)
getJobReturn("job3")
// output: 2026.07.03 15:02:45.048
deleteJobArtifacts("job3")
getAllJobs()

node

userID

jobId

jobDesc

priority

parallelism

clientIp

clientPort

receivedTime

startTime

endTime

errorMsg

local11453 admin job3 now 4 2 192.168.1.193 65216 2026.07.03 15:02:45.046 2026.07.03 15:02:45.048 2026.07.03 15:02:45.048

Related functions: deleteJobArtifacts, getRecentJobs, scheduleJob, submitJob, submitJobEx, submitJobEx2