Skip to contents

Given a command string and arguments, runs it, checks if the process is still alive, and if the process has died, launches it again. Requires packages sys and ps.

Usage

ft_launch_watch_relaunch(
  command,
  args = NULL,
  ntry = 10,
  check_interval = 60,
  status_expected = "running",
  ...
)

Arguments

command

the command to run

args

the command arguments

ntry

how many times to try relaunching the command

check_interval

how long to wait in seconds before checking on it

status_expected

what status is expected, default is "running"

...

other arguments passed to sys::exec_background

Value

NULL invisibly