mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-11-29 10:43:53 +00:00
cron: random delay for restart
This commit is contained in:
parent
456e86b932
commit
0e6712a599
@ -7,7 +7,7 @@
|
||||
# This file is public domain in the USA and all free countries.
|
||||
# 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
|
||||
@ -27,9 +27,9 @@ MAILTO=root
|
||||
# * * * * * USER command to execute
|
||||
# * * * * * root echo "run every minute!"
|
||||
|
||||
# run as www every day at 0:00
|
||||
0 0 * * * nobody /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
|
||||
# run as www every day at 0:00 plus random sleep between 1-3h
|
||||
0 0 * * * nobody sleep "${RANDOM:0:4}s" ; /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 resumeback # (re)start background jobs
|
||||
|
||||
# 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
|
||||
|
Loading…
Reference in New Issue
Block a user