title: print X items from list at scheduled time intervals
body: <p>I have a json array with some data (name,address), I'd like to print one name every five minutes: so far I've got this:</p>
  <pre><code>def get_data(i):
      f = open('data.json' , 'r')
      infos = json.load(f)
      name = infos['people'][i]['name']
      print(name)
      i+=1
  schedule.every(5).minutes.do(get_data, i=0)
  
  while True:
      schedule.run_pending()
      time.sleep(1)
  </code></pre>
  <p>but it obviously doesn't work because I'm setting i to zero every time that get_data gets called, is there a better way to do this?</p>