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:
parent
8de9d0f16f
commit
dca5a55a8a
8
main.go
8
main.go
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user