Skip to content

Instantly share code, notes, and snippets.

@ik5 ik5/run_at.sh
Last active Dec 21, 2015

Embed
What would you like to do?
random execution in given time
#!/bin/bash
seq=$(seq -s ' ' $[ $RANDOM % 8 +1 ] )
hour=($(shuf --input-range=0-23 -n 8 | tr '\n' ' '))
minutes=($(shuf --input-range=0-59 -n 8 | tr '\n' ' '))
for i in $seq ; do
atime=${hour[$i - 1]}${minutes[$i - 1]}
$(at $atime <<< /usr/bin/runsomething)
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.