getJobStatus returns the internal table which stores information about the computational
status of jobs, getJobPars a table with the job parameters, getJobResources a table
with the resources which were set to submit the jobs, and getJobTags the tags of the jobs
(see Tags).
getJobTable returns all these tables joined.
getJobTable(ids = NULL, reg = getDefaultRegistry())
getJobStatus(ids = NULL, reg = getDefaultRegistry())
getJobResources(ids = NULL, reg = getDefaultRegistry())
getJobPars(ids = NULL, reg = getDefaultRegistry())
getJobTags(ids = NULL, reg = getDefaultRegistry())[data.frame or integer]
A data.frame (or data.table)
with a column named “job.id”.
Alternatively, you may also pass a vector of integerish job ids.
If not set, defaults to all jobs.
Invalid ids are ignored.
[Registry]
Registry. If not explicitly passed, uses the default registry (see setDefaultRegistry).
[data.table] with the following columns (not necessarily in this order):
Unique Job ID as integer.
Time the job was submitted to the batch system as POSIXct.
Time the job was started on the batch system as POSIXct.
Time the job terminated (successfully or with an error) as POSIXct.
Either NA if the job terminated successfully or the error message.
Estimate of the memory usage.
Batch ID as reported by the scheduler.
Log file. If missing, defaults to [job.hash].log.
Unique string identifying the job or chunk.
Time in seconds (as difftime) the job was queued.
Time in seconds (as difftime) the job was running.
List of parameters/arguments for this job.
List of computational resources set for this job.
Tags as joined string, delimited by “,”.
Only for ExperimentRegistry: the problem identifier.
Only for ExperimentRegistry: the algorithm identifier.
tmp = makeRegistry(file.dir = NA, make.default = FALSE)
#> No readable configuration file found
#> Created registry in '/tmp/batchtools-example/reg' using cluster functions 'Interactive'
f = function(x) if (x < 0) stop("x must be > 0") else sqrt(x)
batchMap(f, x = c(-1, 0, 1), reg = tmp)
#> Adding 3 jobs ...
submitJobs(reg = tmp)
#> Submitting 3 jobs in 3 chunks using cluster functions 'Interactive' ...
#> Error in (function (x) : x must be > 0
waitForJobs(reg = tmp)
#> [1] FALSE
addJobTags(1:2, "tag1", reg = tmp)
addJobTags(2, "tag2", reg = tmp)
# Complete table:
getJobTable(reg = tmp)
#> Key: <job.id>
#> job.id submitted started done
#> <int> <POSc> <POSc> <POSc>
#> 1: 1 2025-10-14 14:51:19 2025-10-14 14:51:19 2025-10-14 14:51:19
#> 2: 2 2025-10-14 14:51:19 2025-10-14 14:51:19 2025-10-14 14:51:20
#> 3: 3 2025-10-14 14:51:20 2025-10-14 14:51:20 2025-10-14 14:51:20
#> error mem.used batch.id log.file
#> <char> <num> <char> <char>
#> 1: Error in (function (x) : x must be > 0 NA cfInteractive <NA>
#> 2: <NA> NA cfInteractive <NA>
#> 3: <NA> NA cfInteractive <NA>
#> job.hash job.name time.queued time.running
#> <char> <char> <difftime> <difftime>
#> 1: job000d6a2e4dbee037b00945d3f6d58876 <NA> 0.010599852 secs 0.2261002 secs
#> 2: jobd85ca506a7438042d863279825b4ebdd <NA> 0.007200003 secs 0.2028000 secs
#> 3: jobc09ca0ba3b6e379a297020adcd802d47 <NA> 0.007699966 secs 0.2778001 secs
#> job.pars resources tags
#> <list> <list> <char>
#> 1: <list[1]> <list[0]> tag1
#> 2: <list[1]> <list[0]> tag1,tag2
#> 3: <list[1]> <list[0]> <NA>
# Job parameters:
getJobPars(reg = tmp)
#> Key: <job.id>
#> job.id job.pars
#> <int> <list>
#> 1: 1 <list[1]>
#> 2: 2 <list[1]>
#> 3: 3 <list[1]>
# Set and retrieve tags:
getJobTags(reg = tmp)
#> Key: <job.id>
#> job.id tags
#> <int> <char>
#> 1: 1 tag1
#> 2: 2 tag1,tag2
#> 3: 3 <NA>
# Job parameters with tags right-joined:
rjoin(getJobPars(reg = tmp), getJobTags(reg = tmp))
#> Key: <job.id>
#> job.id job.pars tags
#> <int> <list> <char>
#> 1: 1 <list[1]> tag1
#> 2: 2 <list[1]> tag1,tag2
#> 3: 3 <list[1]> <NA>