Help with console commands

How do I make it so I run a specific console command for myself every 10 seconds and if you can do this, how do I stop it?
Thanks