2019-03-24 18:31:54 +00:00
|
|
|
#
|
2020-06-23 14:35:50 +00:00
|
|
|
# this is an example crontab file for telegram-bot-bash
|
2019-03-24 18:31:54 +00:00
|
|
|
# copy it to /etc/cron.d/bashbot
|
|
|
|
#
|
|
|
|
# (c) https://github.com/gnadelwartz
|
|
|
|
#
|
|
|
|
# This file is public domain in the USA and all free countries.
|
|
|
|
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
|
2019-03-28 15:51:33 +00:00
|
|
|
#
|
2020-12-25 20:47:08 +00:00
|
|
|
#### $$VERSION$$ v1.20-0-g2ab00a2
|
2019-03-28 15:51:33 +00:00
|
|
|
|
2019-03-24 18:31:54 +00:00
|
|
|
|
|
|
|
SHELL=/bin/sh
|
|
|
|
PATH=/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:
|
2019-03-27 10:07:46 +00:00
|
|
|
# place your mailadress here
|
|
|
|
MAILTO=root
|
2019-03-24 18:31:54 +00:00
|
|
|
|
|
|
|
|
|
|
|
# ┌───────────── minute (0 - 59)
|
|
|
|
# │ ┌───────────── hour (0 - 23)
|
|
|
|
# │ │ ┌───────────── day of the month (1 - 31)
|
|
|
|
# │ │ │ ┌───────────── month (1 - 12)
|
|
|
|
# │ │ │ │ ┌───────────── day of the week (0 - 6) (Sunday to Saturday;
|
|
|
|
# │ │ │ │ │ 7 is also Sunday on some systems)
|
|
|
|
# │ │ │ │ │
|
|
|
|
# │ │ │ │ │
|
|
|
|
# * * * * * USER command to execute
|
|
|
|
# * * * * * root echo "run every minute!"
|
|
|
|
|
2020-07-13 07:33:07 +00:00
|
|
|
# run as www every day at 0:00 plus random sleep between 0-3h
|
|
|
|
0 0 * * * nobody sleep "$((RANDOM \% 180 ))m" ; /usr/local/telegram-bot-bash/bashbot.sh start # (re)start bot
|
|
|
|
0 0 * * * nobody sleep "$((RANDOM \% 180 ))m" ; /usr/local/telegram-bot-bash/bashbot.sh resumeback # (re)start background jobs
|
2019-03-24 18:31:54 +00:00
|
|
|
|
|
|
|
# run as www on 24 of Dec, 12:00
|
2019-03-31 10:12:55 +00:00
|
|
|
0 12 24 12 * nobody /usr/local/telegram-bot-bash/bashbot.sh broadcast "X-Mas shopping is over!" # broadcast a message
|
2019-03-24 18:31:54 +00:00
|
|
|
|