mirror of
https://github.com/idanoo/go-mastodon-stats
synced 2025-07-04 15:22:19 +00:00
Only post to Mastodon on Mondays
This commit is contained in:
parent
e4a20af1c3
commit
003efe910e
1 changed files with 7 additions and 1 deletions
|
@ -3,6 +3,7 @@ package gomastodonstats
|
||||||
import (
|
import (
|
||||||
"log"
|
"log"
|
||||||
"sort"
|
"sort"
|
||||||
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Run() {
|
func Run() {
|
||||||
|
@ -23,6 +24,11 @@ func Run() {
|
||||||
})
|
})
|
||||||
|
|
||||||
sendToMatrix(updatedMetrics)
|
sendToMatrix(updatedMetrics)
|
||||||
|
|
||||||
|
// Only post weekly here
|
||||||
|
weekday := time.Now().Weekday()
|
||||||
|
if weekday == time.Monday {
|
||||||
postToMastodon(updatedMetrics)
|
postToMastodon(updatedMetrics)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue