q.scheduler: schedule rmd script

Description Usage Arguments Value See Also Examples

Description

create weekly schedule job with rmd script.

Usage

1
2
3
jid <- q.schedule(wday='Monday', hour=6,
                  script='tests/monday.report.Rmd',
                  name='!my first schedule report!')

Arguments

wday

'Monday','Tuesday'...

hour

specify hour of day, 1, 2, 3, 4 ..13

name

specify name of job. If NULL, JID used

script

path to your Rmarkdown script (i.e. /home/usrs/report/monthly.Rmd)

code

R code text if you prefer to use

wdir

specify where is job log root

params

knitr parameter for dynamic report

outputfile

if you want to save outputfile to specific location or name. Default, write it out to log/output.

Value

jid

path to job queue

See Also

q.monitor, q.reschedule

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Not run: 

# create scheduler test

q.template(edit=TRUE) # edit new test

# !! save it to tests/monday.report.Rmd !!

# run this script Monday, 6Am
jid <- q.schedule(wday='Monday', hour=6,
                  script='tests/monday.report.Rmd',
                  name='!my first schedule report!')

q.monitor() # start monitoring schedule job

# check if this work once
q.reschedule(jid=jid, now=TRUE)

# current job queue
q.show()


## End(Not run)

okux/qrmarkdown documentation built on Dec. 22, 2021, 4:17 a.m.