Scans for jobs

job_seek(dirs = getOption(""), seek = c("workbch", "git",
  "Rproj"), nesting = FALSE, owner = "", priority = 1,
  status = "active", tags = character(0))



directories to scan


search criterion


allow nested jobs (default = FALSE)


default owner for a created job


default priority for a created job


default status for a created job


default tags for a created job


The job_seek() searches the folders listed in dirs to find possible candidates that could be added as workbch jobs, or to recover the location of any such jobs that may have moved. When candidate folders are found, the user is presented with prompts asking if they would like to add the folder as a workbch job (or pair it with an existing job if a match is discovered).

The search process uses a heuristic to discover possible jobs. A folder is considered a possible candidate if it has a .Rproj file, a .workbch file, or a git repository. If nesting = FALSE (the default), a directory that is contained within another directory that meets one of these criteria is not considered a candidate.

As much as possible the job_seek() function attempts to guess values for the various parameters. For instance, if there is a git repository that has an upstream remote (on gitbub, bitbucket or gitlab), it attempts to guess an appropriate URL for the remote. Similarly, if there is a .workbch sentinel file, it uses the contents of the file to try to match the folder against a known job and takes the jobname from the sentinel file. Otherwise it guesses a default value using the folder name. For parameter values that cannot be guessed from the folder itself, default values are specified using the owner, priority, status and tags arguments.

Regardless of the values guessed, the user is prompted either to confirm the guessed value (by hitting enter) or overriding the guess by supplying the value manually.