ez.retry: retry, wrapper of 'try'

View source: R/os.R

ez.retryR Documentation

retry, wrapper of try

Description

retry, wrapper of try

Usage

ez.retry(
  expr,
  times = 5,
  pause = 3,
  verbose = FALSE,
  isError = function(x) "try-error" %in% class(x)
)

Arguments

expr

no need to quote the expr

times

max number of retry attempts

pause

time in seconds between attempts

Note

see also insistently retry(func_that_might_fail(param1, param2), times=10, pause=2) to retry calling that function with those parameters, give up after 10 errors, and pause 2 seconds between attempts.


jerryzhujian9/zmisc documentation built on March 9, 2024, 12:49 a.m.