Create a new job
job_create(jobname = NULL, description = NULL, owner = NULL, status = NULL, priority = NULL, tags = NULL, path = NULL)
jobname | name of the job to create |
---|---|
description | brief description of the job |
owner | should be a name or a nickname |
status | should be "active", "inactive", "complete", "abandoned", "masked" |
priority | numeric |
tags | a string containing comma separated list of tags |
path | path to the job home directory |
Invisibly returns a list containing the parameters for the job
The role of the job_create()
function is to create new workbch job.
It can be called in two ways, interactively or programmatically. To call the
function interactively, R must be in interactive mode and the function should
be called with no arguments specified. When called in this fashion the user
will be presented with a sequence of prompts, asking them to specify each
of the parameters that define a job (e.g., a character string for jobname
,
a number for priority
). When used interactively, you do not need to include
quote marks when entering a string: job_create()
will coerce the input to
the appropriate format, and then append the created job to the job file.
When called programmatically, the user must specify the arguments in the
call to job_create()
. The jobname
, description
and
owner
arguments should be character strings of length 1, and all three
are mandatory. The status
for a job should be one of the following
values: "active"
, "inactive"
, "complete"
, "abandoned"
or "masked"
. The priority
for a job should be a positive integer:
the intent is that priority 1 is the highest priority, followed by priority 2,
and so one. The tags
for a job can be specified as a single string, using
|
as a separator character (e.g., tags = "research | statistics"
would create two tags for the job). Finally, the path
should specify the
location of a folder containing the project files.
For non-mandatory arguments, if the user does not specify a value, the
job_create()
function applies the following defaults: priority = 1
,
status = "active"
, tags = character(0)
and path = NA
`.
Note that, although jobs can also be associated with URLs (e.g., link to a
GitHub repository or a document on Overleaf), the job_create()
function
does not (at this time) allow you to specify URLs. These can be added using
job_modify()
.