Description Usage Author(s) Examples
rmarkdown job queue control, non socket implementation fits to ASW. It takes knitr param, catch error, update status, rerun job, schedule job. \
Before use it, set up QWD in your environment value. export QWD="whereever you want to log file to be!"
You need 2 separate R consoles in terminal to run deamon. It makes it easier.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # check QWD
Sys.getenv('QWD')
# Start deamon in R console queue executor . n=number
Rscript -e 'qrmarkdown::deamon(wait=TRUE)'
# THIS PROCESS RUN SEPARATELY IN SERVER
# BY LOADING LIBRARY, YOU CAN RUN ANY SCRIPT IN QUEUE PROCESS.
# to test
require(qrmarkdown)
jid <- q.push(code='ls()')
q.wait(jid)
|
Chris Okugami
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ## Not run:
q.dispatcher(wait=FALSE, printq=FALSE)
jid <- q.push(script="tests/MyTest.Rmd",
params=list(testparam=1, condition=FALSE ...),
outputfile = 'chris.html')
q.wait(jid) # wait all queue to be completed
q.ls(jid, view.output=TRUE)
q.run(jid)
q.reschedule(jid,wday='Monday',hour=2)
# create 30 job dispatcher
q.dispatcher(wait=FALSE, printq=FALSE, n=30, n.sleep=1)
q.shutdown()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.