Skip to content

Commit adc27b6

Browse files
committed
Run once before the timer
1 parent 9155644 commit adc27b6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

main.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,13 @@ func run(cmd *cobra.Command, args []string) error {
182182
return fmt.Errorf("invalid interval: %v", err)
183183
}
184184

185+
go func() {
186+
err := notify(c)
187+
if err != nil {
188+
fmt.Fprintf(os.Stderr, "Notify error: %v\n", err)
189+
}
190+
}()
191+
185192
sigCh := make(chan os.Signal, 1)
186193
signal.Notify(sigCh, syscall.SIGTERM)
187194

0 commit comments

Comments
 (0)