Well constantly running a command could overload your server, but if you REALLY wanted to, you'd just have to make a plugin that schedules an event every second (or 20 ticks) and then in that event, have it run the section of code, but if it's more than a few lines, it may overload it.