Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
cron for bot
echo `date` >> /tmp/autofaves.log
maxdelay=$((16*60)) # 16 hours from 2am to 11pm (in minutes)
for ((x=1; x<=24; x++)); do
# pick random delay for each of the 24 runs
# background a subshell to wait, then run
(sleep $((delay*60)); cd /apps/xdaysb4nba && ruby fave.rb || echo "ERROR!") &
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.