cron: random delay for restart

This commit is contained in:
Kay Marquardt (Gnadelwartz) 2020-06-27 19:05:09 +02:00
parent 456e86b932
commit 0e6712a599

View File

@ -7,7 +7,7 @@
# This file is public domain in the USA and all free countries. # This file is public domain in the USA and all free countries.
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
# #
#### $$VERSION$$ v0.98-pre2-0-ga597303 #### $$VERSION$$ v0.98-pre2-12-g456e86b
SHELL=/bin/sh SHELL=/bin/sh
@ -27,9 +27,9 @@ MAILTO=root
# * * * * * USER command to execute # * * * * * USER command to execute
# * * * * * root echo "run every minute!" # * * * * * root echo "run every minute!"
# run as www every day at 0:00 # run as www every day at 0:00 plus random sleep between 1-3h
0 0 * * * nobody /usr/local/telegram-bot-bash/bashbot.sh start # (re)start bot 0 0 * * * nobody sleep "${RANDOM:0:4}s" ; /usr/local/telegram-bot-bash/bashbot.sh start # (re)start bot
0 0 * * * nobody /usr/local/telegram-bot-bash/bashbot.sh resumeback # (re)start background jobs 0 0 * * * nobody sleep "${RANDOM:0:4}s" ; /usr/local/telegram-bot-bash/bashbot.sh resumeback # (re)start background jobs
# run as www on 24 of Dec, 12:00 # run as www on 24 of Dec, 12:00
0 12 24 12 * nobody /usr/local/telegram-bot-bash/bashbot.sh broadcast "X-Mas shopping is over!" # broadcast a message 0 12 24 12 * nobody /usr/local/telegram-bot-bash/bashbot.sh broadcast "X-Mas shopping is over!" # broadcast a message