I installed rstudio on aws lightsail following by https://jrfarrer.github.io/r/2016/12/29/RStudio-Lightsail.html.
Now i am trying to run rscript every minute using by crontab or anything that run rscript regularly.
Thank you in advance
Asked
Active
Viewed 740 times
0

asbebe
- 71
- 1
- 11
1 Answers
3
Well, I assume you use the r-base image. If you just need your R script to run in the currently existing container, just create a new cron entry in your host using the docker exec
command.
Example
* * * * * docker exec -it $instanceName Rscript yourScript.R

Stefano
- 4,730
- 1
- 20
- 28
-
Thank you for the answer. i got the log "time="2017-11-02T16:33:01Z" level=fatal msg="Post http:///var/run/docker.sock/v1.18/containers/rstudio2/exec: dial unix /var/run/docker.sock: permission denied. Are you trying to connect to a TLS-enabled daemon without TLS?" " – asbebe Nov 02 '17 at 16:35
-
1ohh sorry... You have to set it up in a user having the `docker` group defined – Stefano Nov 02 '17 at 16:46
-
Thank you it helps alot. – asbebe Nov 02 '17 at 17:19