I have a command which keeps sending messages and I cannot rate limit it. What I want to do is call the command, let it run for 5 seconds, sleep for 1 minute and then call the script again.
Normally I would write:
#!/bin/bash
while :
do
myCommand
sleep 60
done
What I want to do is:
#!/bin/bash
while :
do
run myCommand for 5 seconds and stop.
sleep 60
done
I am not limited to bash, if any other scripting language can do this in an easier way, I don't mind exploring that. Note: myCommand Keeps running and has to be interrupted.