diff --git a/main.go b/main.go index d8872be..7d9cf39 100644 --- a/main.go +++ b/main.go @@ -41,9 +41,11 @@ func main() { func cycle() { now := time.Now() lastWeek := now.Add(-time.Hour * 24 * time.Duration(now.Weekday()-time.Monday)) - err := createIfNotExists(lastWeek.Format("semana 2006-01-02")) - if err != nil { - log.Fatalln(err) + if now.Weekday() > time.Sunday { + err := createIfNotExists(lastWeek.Format("semana 2006-01-02")) + if err != nil { + log.Fatalln(err) + } } time.Sleep(time.Hour * 5)