Rstudio server or R on virtual machine

Hi,

I have a certain use case and I am not sure what is the best way to tackle it: I do webscraping with a script in RStudio. I would like to automatically run the script once per day. Since I am not at my own computer every day, I would like to transfer this task to another machine/server. I have two options to tackle this in mind: 1) Use RStudio Server (haven't worked with it yet) or 2) use RStudio on a virtual machine that is running on another server. I wonder, what is the best approach to do this?

Thanks for your ideas!

Another option, use a virtual server with R installed (RStudio is not mandatory) and run your R script with a cron job automatically.

One good option for the virtual server would be an Amazon Web Service EC2 instance, they even have a free tier.

1 Like

it's not entirely obvious to me why you need RStudio at all for this use case. If your script is going to be run automatically, you don't need an IDE. If your personal machine is always on, you could just schedule a cron job. Or you could install Airflow and use it for scheduling.

2 Likes

Thanks for the reply. I am not attached to RStudio, but I thought RStudio Server might be a comfortable option.

I don't think it provides anything you need here. RStudio Server is a development environment. You're scheduling automated jobs, which needs no dev environment. You might need the scheduling services from RStudio Connect, but if you're just scheduling one job Connect is a bit overkill.

1 Like

Ok, great, I'll discard RStudio then.

Wonderful, great help! I have set up an EC2 instance now. But its running Windows (I am way more familiar with that), i.e. cron is not available. Do you have any recommendation how to let the script automatically run once per day?

I'm not too familiar with the server flavours of Windows, but the PC version has a Task Scheduler that you can use to schedule the execution of scripts and other programs :slightly_smiling_face: Type "Task Scheduler" into the Start search and it should pop up!

1 Like

You can also do it from R, with the taskscheduleR package

2 Likes

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.