Task Scheduler R

If you are working on a Power bi Combined with R language  and want to schedule your R scripts while you are off running, sleeping or having a coffee break, online exsist a brilliant solution that works with Windows:

Task Schedule R

A scheduled task is a script with R code which is run through Rscript, You can schedule tasks :

  • once
  • monthly
  • weekly
  • daily
  • Hourly
  • Minute
  • onlogon
  • onidle

After the script has run, you can check the log which can be found at the same folder as the R script.

Some Examples to use it:

Start Library

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

run script once within 62 seconds

taskscheduler_create(taskname = “myfancyscript”, rscript = myscript,
schedule = “ONCE”, starttime = format(Sys.time() + 62, “%H:%M”))

run script every day at 09:10

taskscheduler_create(taskname = “myfancyscriptdaily”, rscript = myscript,
schedule = “DAILY”, starttime = “09:10″)

delete the tasks

taskscheduler_delete(taskname = “myfancyscript”)
taskscheduler_delete(taskname = “myfancyscriptdaily”)

Annunci

Rispondi

Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione / Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione / Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione / Modifica )

Google+ photo

Stai commentando usando il tuo account Google+. Chiudi sessione / Modifica )

Connessione a %s...