Automate scrips in RStudio Cloud?

Hello everyone! I have a model in R and I need to automate its execution twice a day. I know I can do it with CronR, but I need it to run automatically when the computer is off. I've thought about GCP VMs, but any recommendations?

Thanks a lot!!

You have published on the #rstudio-cloud category (which is a service offered by Posit) but it seems you are talking about using cloud computing services in general.

RStudio Cloud is not the best choice for this application because you can't left an instance running 24/7, they have a background execution limit of 1 hour.

On the other hand, any cloud computing service will do the job, I like to use AWS EC2 but they all can work for your application.

Thank you @andresrcs,

My goal is to be able to launch the script twice a day. Do you think connecting RStudio with a virtual machine is the best option?

Do you think there are other better alternatives?

Thank you!

I don't understand what you mean exactly but in any case, it is not mandatory to have RStudio installed in order to run an R script, you just need R and you can schedule the execution of an R script using cron on Linux or the task scheduler on Windows. If you want to use a virtual machine for this, the service provider is irrelevant, they can all do the job.

It might be possible to use a serverless computing service (e. g. AWS Lambda) but I'm not aware of one that supports running R scripts directly and that can be scheduled to run periodically.

Hi Diego,

Andres is correct that at the moment, RStudio Cloud (soon to be Posit Cloud!) would not be the best choice for what you're trying to do. We do have it in our roadmap to eventually support this functionality, but it's further back in the roadmap so I couldn't give you any estimate of when this functionality might become a thing.

Thank you @kyle_hekhuis! I have finally chosen to take it to AWS EC2 as @andresrcs commented, although I find some problems when trying to install some libraries. I'll keep trying but it seems like a good option.

A post was split to a new topic: When I click on an .rproj file, Microsoft Publisher Starts

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.