bnosac / taskscheduleR

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

taskscheduleR and rds files #59

Closed samuelt174 closed 6 years ago

samuelt174 commented 6 years ago

Hi, do you have a recommendation for how best to use taskscehduleR in concert with RDS files? I have turned off file compression when I save the RDS, but I continue to receive the error below when I attempt to run a scheduled task that involves loading an RDS file.

The script is to launch a Shiny app on a regularly scheduled basis. I appreciate any help as I cannot locate any information about this particular issue anywhere else.

Error in gzfile(file, "rb") : cannot open the connection Calls: readRDS -> gzfile In addition: Warning message: In gzfile(file, "rb") : cannot open compressed file 'data/rds/FixitZones.rds', probable reason 'No such file or directory' Execution halted

jwijffels commented 6 years ago

Provide full path to the file, not a relative path with respect to a folder. Launching a shiny app as a schedule seems to me bizarre. What does seem logical is a schedule which creates data which is then picked up by a shiny reactive filereader which updates the app if the generated file (.rds for example) has been change by the taskscheduler or cronr schedule.