Files
tg-holy-bot/internal/holy/cronTask.go
2026-03-14 22:51:43 +03:00

25 lines
456 B
Go

package holy
import (
"tg-holy-bot/internal/log"
)
// CronTask sends generated hiliday list to the channel.
func CronTask() {
log.Info("Cron Task triggered")
phrase, err := APIClient()
if err != nil {
log.Errorf("Unable to get holidays: %s", err)
return
}
if _, err = Bot.SendMessage(phrase, Config.ChannelID, nil); err != nil {
log.Errorf("Unable to send message to channel: %s", err)
}
}
/* vim: set ft=go noet ai ts=4 sw=4 sts=4: */