asbebe
asbebe

Reputation: 71

How to set up to run r script on docker image using crontab

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

Upvotes: 0

Views: 786

Answers (1)

Stefano
Stefano

Reputation: 5076

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

Upvotes: 3

Related Questions