1
1
mirror of https://github.com/cooperspencer/gickup synced 2024-11-08 12:09:18 +01:00

add cron to all files if necessary (#211)

This commit is contained in:
Andreas Wachter 2024-02-27 07:01:04 +01:00 committed by GitHub
parent 8de9d0f16f
commit dca5a55a8a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -563,6 +563,14 @@ func playsForever(c *cron.Cron, conffiles []string, confs []*types.Conf) bool {
checkconfigs = append(checkconfigs, readConfigFile(f)...)
}
if checkconfigs[0].HasValidCronSpec() {
for num, config := range checkconfigs {
if !config.HasValidCronSpec() {
checkconfigs[num].Cron = checkconfigs[0].Cron
}
}
}
if !cmp.Equal(confs, checkconfigs) {
log.Info().Msg("config changed")
for _, entry := range c.Entries() {