wait_for_job | R Documentation |
It is intended to give you control over job dependencies within R when the formal PBS depend approach is insufficient, especially in the case of a script that spawns child jobs that need to be scheduled or complete before the parent script should continue.
wait_for_job(
job_ids,
sleep_interval = 30,
max_wait = 60 * 60 * 24,
scheduler = "local",
quiet = TRUE,
stop_on_timeout = TRUE
)
job_ids |
One or more job ids of existing PBS or slurm jobs, or process ids of a local process for
|
sleep_interval |
How often to recheck the job status, in seconds. Default: 30 |
max_wait |
How long to wait on the job before giving up, in seconds. Default: 24 hours (86,400 seconds) |
scheduler |
What scheduler is used for job execution. Options: c("torque", "qsub", "slurm", "sbatch", "sh", "local") |
quiet |
If |
Note that for the scheduler
argument, "torque" and "qsub" are the same;
"slurm" and "sbatch" are the same, and "sh" and "local" are the same.
Nothing. Just returns when the blocking job completes.
Michael Hallquist
## Not run:
# example on qsub/torque cluster
wait_for_job('7968857.torque01.util.production.int.aci.ics.psu.edu', scheduler="torque")
# example of waiting for two jobs on slurm cluster
wait_for_job(c('24147864', '24147876'), scheduler="slurm")
# example of waiting for two jobs on local machine
wait_for_job(c('9843', '9844'), scheduler="local")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.