1
1
mirror of https://github.com/cooperspencer/gickup synced 2024-10-18 07:38:08 +02:00

add cron to all files if necessary

This commit is contained in:
Andreas Wachter 2024-02-26 14:43:19 +01:00
parent 8de9d0f16f
commit 78989aacce

@ -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() {