Only post to Mastodon on Mondays

This commit is contained in:
idanoo 2023-02-12 14:08:40 +13:00
parent e4a20af1c3
commit 003efe910e
Signed by: idanoo
GPG key ID: 387387CDBC02F132

View file

@ -3,6 +3,7 @@ package gomastodonstats
import (
"log"
"sort"
"time"
)
func Run() {
@ -23,6 +24,11 @@ func Run() {
})
sendToMatrix(updatedMetrics)
// Only post weekly here
weekday := time.Now().Weekday()
if weekday == time.Monday {
postToMastodon(updatedMetrics)
}
}
}