You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you use here() it starts in the wrong working directory when a RECURRING cronjob is set using the cronr package. With a ONCE executed cronjob it does work somehow
Example:
My working dir is /home/rstudio/R/r-projects. I have set this in Global options. Moreover I have set in the .Rprofile this wd as starting dir for the cronjob. via CRON_LIVE
However when the cronjob starts here states:
here() starts at /home/rstudio
This is the old, initial wd
The solution is that I had to set the wd in the command line and than lib:
setwd("/home/rstudio/R/r-projects")
library(here)
However this shouldnt be the case officially. I dont know if this is an here or cronr issue btw. But a solution would be great!
The text was updated successfully, but these errors were encountered:
I'm not familiar with the cronr package, but cronjobs have a very specific notion of the environment (working directory, environment variables, ...) they are executed in. The initial working directory of the R process is what drives the behavior of the here package.
Hi
When you use
here()
it starts in the wrong working directory when a RECURRING cronjob is set using the cronr package. With a ONCE executed cronjob it does work somehowExample:
My working dir is
/home/rstudio/R/r-projects
. I have set this in Global options. Moreover I have set in the .Rprofile this wd as starting dir for the cronjob. via CRON_LIVEHowever when the cronjob starts here states:
here() starts at /home/rstudio
This is the old, initial wd
The solution is that I had to set the wd in the command line and than lib:
However this shouldnt be the case officially. I dont know if this is an
here
orcronr
issue btw. But a solution would be great!The text was updated successfully, but these errors were encountered: