This function simply waits until all jobs are terminated.
waitForJobs(ids = NULL, sleep = NULL, timeout = 604800,
expire.after = NULL, stop.on.error = FALSE, stop.on.expire = FALSE,
reg = getDefaultRegistry())
with a column named “job.id”.
Alternatively, you may also pass a vector of integerish job ids.
If not set, defaults to the return value of
Invalid ids are ignored.
Parameter to control the duration to sleep between queries.
You can pass an absolute numeric value in seconds or a
function(i) which returns
the number of seconds to sleep in the
If not provided (
NULL), tries to read the value (number/function) from the configuration file
reg$sleep) or defaults to a function with exponential backoff between
5 and 120 seconds.
timeout seconds, show a message and return
FALSE. This argument may be required on some systems where, e.g.,
expired jobs or jobs on hold are problematic to detect. If you don't want
a timeout, set this to
Inf. Default is
604800 (one week).
Jobs count as “expired” if they are not found on the system but have not communicated back
their results (or error message). This frequently happens on managed system if the scheduler kills
a job because the job has hit the walltime or request more memory than reserved.
On the other hand, network file systems often require several seconds for new files to be found,
which can lead to false positives in the detection heuristic.
waitForJobs treats such jobs as expired after they have not been detected on the system
If not provided (
NULL), tries to read the value from the configuration file (stored in
and finally defaults to
Immediately cancel if a job terminates with an error? Default is
Immediately cancel if jobs are detected to be expired? Default is
Expired jobs will then be ignored for the remainder of
Registry. If not explicitly passed, uses the default registry (see
TRUE if all jobs terminated
FALSE if either the timeout is reached or at least
one job terminated with an exception or expired.