Description Usage Arguments Details Value Functions Examples
The following functions allow users to schedule functions in a virtual agenda, and initiate a loop that periodically checks whether any particular function is due.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
code |
Code of any length. It will remain unevaluated until the job is run -
save for the parts of the code wrapped in |
runtime |
a future timestamp (use in conjunction with |
loopid |
A handle to an event loop. |
jobid |
one or multiple jobids, which serve as identifiers for the scheduled jobs, to be deleted |
jobnum |
Number of job(s) to be deleted |
status |
status of job(s) to be deleted |
delete |
Logical. If true, deletes jobs from schedule. If false, sets their status to 'disabled' instead. Default is TRUE. |
rate |
numeric, in seconds. How often should the loop check for a new task to be run? |
tolerance |
numeric, in seconds; jobs that were scheduled this many seconds in the past will still be run. Jobs beyond this point will be considered missed. |
on.error |
character; what is to be done when a job results in an error? Defaults to "continue". |
on.miss |
character; what is to be done when a job is missed? Defaults to "continue". |
on.complete |
character; what is to be done to the loop when there are no more jobs to be run? Defaults to "terminate". |
A job can be any line(s) of code, and it will be run at the designated timstamp if the associated loop is running.
startLoop()
starts a loop.
stopLoop()
stops a loop.
delJob()
returns TRUE if successful, FALSE if failed.
tableEnv
: Returns the environment containing the
looptable and the jobtable, allowing for direct modification
rather than through helper functions.
addJob
: Add a job to the schedule.
delJob
: Delete a job. Use in conjunction with jobList()
.
Deletes job(s) based on their number in the job queue/schedule, their IDs, or their status.
jobList
: Returns a data.frame containing all jobs, finished and unfinished.
setLoop
: Configure an existing loop or create a new loop
with custom settings. When started using startLoop()
, this loop
will periodically check for jobs to execute.
When an unknown loopid
is given, a new loop is created.
startLoop
: Start a loop with given loopid.
stopLoop
: Stop a running loop.
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.