Skip to contents

Blocks until a PBS job completes.

Usage

wait_for_pbs_job(
  job_id,
  check_interval = 60,
  timeout = NULL,
  initial_wait = 5,
  output_dir = NULL,
  n_tasks = NULL,
  verbose = TRUE
)

Arguments

job_id

Character. PBS job ID.

check_interval

Integer. Seconds between status checks.

timeout

Integer. Maximum seconds to wait (NULL for no timeout).

initial_wait

Integer. Seconds to wait before first status check. This gives time for the job to be registered in the queue.

output_dir

Character. If provided, also monitors partial_results directory to track progress.

n_tasks

Integer. Total number of expected tasks (used with output_dir).

verbose

Logical. Print progress messages.

Value

Logical. TRUE if job completed, FALSE if timeout.

Examples

if (FALSE) { # \dontrun{
wait_for_pbs_job("12345", timeout = 3600)  # Wait up to 1 hour
} # }