Starts a single job on the local machine.
Usage
testJob(id, external = FALSE, reg = getDefaultRegistry())Arguments
- id
[
integer(1)ordata.table]
Single integer to specify the job or adata.tablewith columnjob.idand exactly one row.- external
[
logical(1)]
Run the job in an external R session? IfTRUE, starts a fresh R session on the local machine to execute the withexecJob. You will not be able to use debug tools liketracebackorbrowser.If
externalis set toFALSE(default) on the other hand,testJobwill execute the job in the current R session and the usual debugging tools work. However, spotting missing variable declarations (as they are possibly resolved in the global environment) is impossible. Same holds for missing package dependency declarations.- reg
[
Registry]
Registry. If not explicitly passed, uses the default registry (seesetDefaultRegistry).
Examples
tmp = makeRegistry(file.dir = NA, make.default = FALSE)
#> No readable configuration file found
#> Created registry in '/tmp/batchtools-example/reg' using cluster functions 'Interactive'
batchMap(function(x) if (x == 2) xxx else x, 1:2, reg = tmp)
#> Adding 2 jobs ...
testJob(1, reg = tmp)
#> ### [bt]: Setting seed to 13900 ...
#> [1] 1
if (FALSE) { # \dontrun{
testJob(2, reg = tmp)
} # }