diff --git a/shell.go b/shell.go index efa1794..037787a 100644 --- a/shell.go +++ b/shell.go @@ -115,3 +115,10 @@ func Run(cmdline string) int { log.Println("END ", cmdline) return 0 } + +func Daemon(cmdline string, timeout time.Duration) int { + for { + Run(cmdline) + time.Sleep(timeout) + } +}