Marsel-marsel / pyCRONos

Sends messages to telegram contacts. Period is set using crontab syntax.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pyCRONos

Sends messages to telegram contacts. Period is set using crontab syntax. This project is a kind of tribute to Mark Lutz's "Learning Python".

Usage

  1. Get your telegram account api_hash and api_id and save them into secrets/api_hash and secrets/api_id

  2. Add user id, message and cron to pyCRONos.yml

    telegram:
     subscribers:
       '@user_name':  # @ symbol can be omitted
         message: "don't forget ur pills"
         cron: '29 0 * * *'  # At 00:29 UTC every day
    
  3. Run pyCRONos.py

    nohup python pyCRONos.py &> /dev/null & 
    
  4. Message will send repeatedly to user according to pyCRONos.yml

    screenshot

About

Sends messages to telegram contacts. Period is set using crontab syntax.


Languages

Language:Python 100.0%