Simple setInterval()

by Town

HTML

<input type="text" />

JavaScript

window.setInterval(() => doThing(), 2000);
function doThing() {
console.log("Thing done");
}