Track things and get notified via Telegram.
Get your secrets ready
- Create a new bot with @BotFather in Telegram
- Get an auth token for the bot in format of
123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11
and save it insecrets/token
- Get your user id from @userinfobot in format of
123456789
and save it insecrets/user_id
ℹ️ Note: My secrets are encrypted with Strongbox (https://github.com/uw-labs/strongbox)
Create a python venv and install the required packages
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt --upgrade pip
- Add this line to
/etc/sudoers
%sudo ALL=(ALL) NOPASSWD: /usr/sbin/service cron start
- Go to Windows Start-up (
Win
+R
andshell:startup
) - Create a
.bat
file with the following command
wsl sudo service cron start
- Check
run.sh
for scripts that will get executed - Manually start
cron
service if it's not running - Add cron jobs to execute scripts e.g.:
# Telegram Bot:
0 * * * * cd /home/me/telegram_bot/ && ./run.sh
The script will loop through all directories specified in the run.sh
and execute all .py
scripts inside these directories. Remove directories you don't need from run.sh
or rename python scripts if you want to temporarily disable them.