telegram-random-quotes

About

How it work:

Thanks for the random quotes which generate by the zenquotes API.

Get telegram-bot

https://telegram.me/BotFather

build

GOOS=linux GOARCH=amd64 go build <your parth of project>/cronJobProject/cronjob.go

upload to host:

scp cronjob [email protected]_ipaddress:/usr/local/src/telegram-bot/

create service:

vi /etc/systemd/system/telegram_bot.service

then add code:

[Unit]
Description=Telegram-bot  service
After=multi-user.target

[Service]
User=root
Group=root
Type=simple
Restart=always
RestartSec=5s
ExecStart=/usr/local/src/telegram-bot/cronjob

[Install]
WantedBy=multi-user.target

run

sudo systemctl start telegram_bot.service
sudo systemctl enable telegram_bot.service
sudo systemctl status telegram_bot.service

LICENSE

This project is licensed under the MIT license. You’re free to use it.

GitHub

View Github