How to run program in R every 10 seconds without Scheduler? -


this question exact duplicate of:

i creating program in r data off api. since real time pricing data, need run program every 10 seconds.

i wondering:

  1. what effective way this?
  2. what easiest way add data excel doc?

enter image description here

use sys.sleep()

i = 1 while(true){     if (i %% 11 == 0){         break           #a condition break out of loop          #write.table()  #but maybe want write results                         #to table after number of iteration     }      print(i)            #run code      sys.sleep(time = 1) #time in seconds      = + 1 } 

Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -