I want in terminal or in crontab(both) be able to put a random time.
Something like
Sleep $(1-300) pkill screen && ./start
just a random simple example
I want in terminal or in crontab(both) be able to put a random time.
Something like
Sleep $(1-300) pkill screen && ./start
just a random simple example
You can sleep for 1 to 300 seconds using the following command :
sleep $(( ( RANDOM % 300 ) + 1 ))
So, to run a command just after that, use sleep $(( ( RANDOM % 300 ) + 1 )) && your command
This answer assume you are using bash