diff --git a/config.example.yaml b/config.example.yaml index 702b74b..55b2912 100644 --- a/config.example.yaml +++ b/config.example.yaml @@ -6,9 +6,9 @@ jobs: description: Backup the production database enabled: true tasks: - - command: echo 15 + - command: pwd --greg retries: 3 - retry-delay: 123s + retry-delay: 1s timeout: 15s env: DB_HOST: 10.0.0.5 @@ -17,13 +17,9 @@ jobs: schedulers: - cron: "* * * * * *" - interval: 1s - - at: 2024/05/15 + # - at: 2024/05/15 hooks: done: - - post: http://google.com/ - headers: - test: test2 + - command: echo Ok failed: - - post: http://google.com/ - headers: - test: test2 + - command: echo Failed diff --git a/main.go b/main.go index 2ca1674..f1157b7 100644 --- a/main.go +++ b/main.go @@ -42,9 +42,7 @@ func main() { logger.InitFromConfig() log = logger.SetupLogger("Crontab-GO") cronInstance := cron.New(cron.WithSeconds()) - log.Info("Booting up") - log.Infoln(cmd.CFG) for _, job := range cmd.CFG.Jobs { if !job.Enabled { log.Warn("job %s is disabled", job.Name) @@ -87,11 +85,11 @@ func main() { logger.Trace("Signals Built") signal := goutils.Zip(signals...) - logger.Infof("Zipping Signals") + logger.Trace("Zipping Signals") go func() { logger.Debug("Spawned work goroutine") for range signal { - logger.Debug("Signal Received") + logger.Trace("Signal Received") for _, task := range tasks { ctx := context.Background() err := task.Execute(ctx)