bnosac / taskscheduleR

Schedule R scripts/processes with the Windows task scheduler.
331 stars 72 forks source link

taskscheduleR when the computer is turned off #99

Closed swaheera closed 1 year ago

swaheera commented 1 year ago

I am following this tutorial here: https://cran.r-project.org/web/packages/taskscheduleR/vignettes/taskscheduleR.html

Suppose I make the following task:

library(taskscheduleR)
myscript <- system.file("extdata", "helloworld.R", package = "taskscheduleR")

## Run every 5 minutes, starting from 10:40
taskscheduler_create(taskname = "myfancyscript_5min", rscript = myscript,
                     schedule = "MINUTE", starttime = "10:40", modifier = 5)

If I turn my computer off and then turn my computer back on - will this task still run every 5 minutes? Or will I need to open R Studio again and re-write the above code?

Thanks!

jwijffels commented 1 year ago

It will not run when your computer is off but will run again if your computer is on.