5

I have a small R script. Typically, 15-20 lines of code. This script replies to random people on Twitter. Everything is working fine when I run the code. Now, I want to auto-run this after fixed intervals of time. So, I made a .bat the file of the R script and schedule the task in the windows scheduler to run after every 15 mins. This works fine as well and the way I expect it to work. Now, the problem is the scheduler works only when my system is working. Once I shut down my system, the scheduler also stops working and the script does not execute.

I want a server (not sure if this is the right word), where I can host the R file or .bat file and where I can schedule the script to execute after every X mins. I need a server (??) because I want this to be active 24 X 7.

I have tried deploying it on shinyapps.io but somehow it doesn't work. Have gone through this as well, with no help. Any help would be appreciated.

Ronak Shah
  • 377,200
  • 20
  • 156
  • 213
  • 1
    one suggestion would be to hire a amazon aws compute instance, and run your Rscript in a cronjob, but this assumes some knowledge of linux. Not sure what you have tried on shinyapps.io, but I assume that you want to use some sort of timeout to trigger a refresh of some `observe()` action, where the interior of the `observe()` calls the twitter API. – Alex May 25 '16 at 05:23
  • e.g, have a variable that auto increments every X minutes, have an observer for that variable, so that when it auto increments it does stuff. – Alex May 25 '16 at 05:24
  • rhcloud is free for micro instances. – Neal Fultz May 25 '16 at 05:26
  • @Alex and @ Neal - I'll try the suggestions given by you. Thank you. – Ronak Shah May 25 '16 at 05:35
  • if you can give us some example code we might be able to give you a working example which polls twitter data for example. – Alex May 25 '16 at 05:45

0 Answers0