wip: created example files with new config and implementing new config in init

This commit is contained in:
2024-03-24 13:24:47 +11:00
parent 6032b6c0c1
commit 8f68c4ace9
12 changed files with 108 additions and 28 deletions
+1 -5
View File
@@ -29,11 +29,7 @@ cron:
for {
if cron.TimeToRun(time.Now()) {
wingmate.Log().Info().Str(cronTag, cron.Name()).Msg("executing")
if len(cron.Command()) == 1 {
cmd = exec.Command(cron.Command()[0])
} else {
cmd = exec.Command(cron.Command()[0], cron.Command()[1:]...)
}
cmd = exec.Command(cron.Command(), cron.Arguments()...)
iwg = &sync.WaitGroup{}
if stdout, err = cmd.StdoutPipe(); err != nil {