Learn R Programming

taskscheduleR (version 1.1)

taskcheduler_runnow: Immediately run a specific task available in the Windows task scheduler.

Description

Immediately run a specific task available in the Windows task scheduler.

Usage

taskcheduler_runnow(taskname)

Arguments

taskname

the name of the task to run. See the example.

Value

the system call to schtasks /Run

Examples

Run this code
# NOT RUN {
myscript <- system.file("extdata", "helloworld.R", package = "taskscheduleR")
taskscheduler_create(taskname = "myfancyscript", rscript = myscript, 
 schedule = "ONCE", starttime = format(Sys.time() + 10*60, "%H:%M"))

taskcheduler_runnow("myfancyscript")
Sys.sleep(5)
taskcheduler_stop("myfancyscript")


taskscheduler_delete(taskname = "myfancyscript")
# }

Run the code above in your browser using DataLab