This will execute the command "/dance4 motion" every 10,000ms (10 seconds).
If you require a randomized interval between command executions, you can simply specify an additional amount of time, called jitter, to randomly be added to your cycle time:
/rp jitter 3000
This will execute the command periodically, ranging between 10 and 13 seconds.