bnosac / taskscheduleR

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

Space error #10

Closed FelipeCarrillo closed 8 years ago

FelipeCarrillo commented 8 years ago

I am getting this error:

taskscheduleR:::taskschedulerAddin() Error in taskscheduleR:::taskschedulerAddin() : Make sure the RscriptRepository does not contain spaces, change argument C:/Program Files/R/R-3.2.1/library/taskscheduleR/extdata to another location on your drive which contains no spaces

jwijffels commented 8 years ago

Change the path of 'Rscript repo: location where Rscripts will be copied to schedule + location of logs' to a path where there are no spaces in as 'Program Files' contains a space. E.g. change it to C:\Users\myusername\Desktop

nsittler commented 8 years ago

I am having this same issue. Can you elaborate on how exactly where to go to change this?

jwijffels commented 8 years ago

If you run taskscheduleR from R. Make sure the rscript argument is the full path to the filename. This filename should not contain spaces. E.g. see below where I launch an .R script which is located at my desktop.

library(taskscheduleR)
taskscheduler_create(taskname = "hithere", 
                     rscript="C:/Users/Jan/Desktop/helloworld.R",
                     schedule = "ONCE", 
                     starttime = format(Sys.time() + 62, "%H:%M"),
                     startdate = format(Sys.Date(), "%d/%m/%Y")) 

"C:/Program Files/R/R-3.2.1/library/taskscheduleR/extdata" contains a space - namely between Program and Files. So put your R script somewhere else in a folder without spaces.

If you use the RStudio addin. Just change the place where it says 'Rscript repo: location where Rscripts will be copied to schedule + location of logs' to a folder on your hard disk where there are no spaces in. E.g. C:/Users/Jan/Desktop/myscripts change_location

nsittler commented 8 years ago

Thanks for the information.

Is there a way to change the default starting path argument for the Rstudio addin? Right now the addin will not even launch in RStudio due to the path name space issue.

[image: Inline image 1]

On Tue, Mar 29, 2016 at 1:49 AM, jwijffels notifications@github.com wrote:

If you run taskscheduleR from R. Make sure the rscript argument is the full path to the filename. This filename should not contain spaces. E.g. see below where I put an .R script at my desktop.

library(taskscheduleR) taskscheduler_create(taskname = "hithere", rscript="C:/Users/Jan/Desktop/helloworld.R", schedule = "ONCE", starttime = format(Sys.time() + 62, "%H:%M"), startdate = format(Sys.Date(), "%d/%m/%Y"))

"C:/Program Files/R/R-3.2.1/library/taskscheduleR/extdata" contains a space - namely between Program and Files. So put your R script somewhere else.

If you use the RStudio addin. Just change the place where it says 'Rscript repo: location where Rscripts will be copied to schedule + location of logs' to a folder on your hard disk where there are no spaces in. E.g. C:/Users/Jan/Desktop/myscripts [image: change_location] https://cloud.githubusercontent.com/assets/1710810/14102604/e7d0865c-f59b-11e5-887f-6f0bbb8bda46.PNG

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/jwijffels/taskscheduleR/issues/10#issuecomment-202782352

Thanks, Nick

jwijffels commented 8 years ago

Can you provide a screenshot of the error message you seem to get.

nsittler commented 8 years ago

See attached for screenshot of the RStudio console.

Thanks for the prompt reply!

-Nick

On Thu, Mar 31, 2016 at 10:05 AM, jwijffels notifications@github.com wrote:

Can you provide a screenshot of the error message you seem to get.

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/jwijffels/taskscheduleR/issues/10#issuecomment-204024288

Thanks, Nick

jwijffels commented 8 years ago

I don't see the image but I think I understand your issue. I move the checking of the spaces in the path to when creating the task. That will allow to start up the add-in even it is installed in a Program Files directory or another directory with spaces in. Please re-install with install_github & check.

nsittler commented 8 years ago

That did the trick. Thanks so much for the help and the great package!

On Thu, Mar 31, 2016 at 10:12 AM, jwijffels notifications@github.com wrote:

I don't see the image but I think I understand your issue. I move the checking of the spaces in the path to when creating the task. That will allow to start up the add-in even it is installed in a Program Files directory or another directory with spaces in. Please re-install with install_github & check.

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/jwijffels/taskscheduleR/issues/10#issuecomment-204027842

Thanks, Nick