as far as i know there is already an add-on for that.
called auto refresher or something. you can set refresh time for each tab or just a single tab.
i was using this back when zybez price guide was a thing, pretty sure the add-on is still around somewhere