% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dispatch.R
\name{dispatch}
\alias{dispatch}
\title{Run an R command in the background and log output}
\usage{
dispatch(
  project_path,
  expr,
  phase,
  label,
  rscript_path = NULL,
  timeout_sec = 600L
)
}
\arguments{
\item{project_path}{Path to the project}

\item{expr}{Expression to run (as a quoted expression or function)}

\item{phase}{Character: "baseline" or "post_migration"}

\item{label}{Character: "document", "test", or "check"}

\item{rscript_path}{Optional path to Rscript}

\item{timeout_sec}{Timeout in seconds}
}
\value{
A list with process info
}
\description{
Run an R command in the background and log output
}
\examples{
\donttest{
  tmp <- tempdir()
  job <- dispatch(tmp, "message('hello')", "baseline", "document")
  Sys.sleep(1)
  job$process$is_alive()
}
}
