diff options
| author | Horus3 | 2015-02-19 13:30:54 +0100 |
|---|---|---|
| committer | Horus3 | 2015-02-19 13:30:54 +0100 |
| commit | 02e6a8b9ae3596ee1c405cdd1541c5cc59b50e3a (patch) | |
| tree | 157a800cc381e78bb03b8868417db8fe12ca8239 /app/fetch.go | |
| parent | d9749f16e15739c7652b05af391af9e59e2307d6 (diff) | |
| download | statuspage-02e6a8b9ae3596ee1c405cdd1541c5cc59b50e3a.tar.gz | |
Static file handling and autoimport the db-driver from Makefile.
Diffstat (limited to 'app/fetch.go')
| -rw-r--r-- | app/fetch.go | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/app/fetch.go b/app/fetch.go index 27aa628..cd8206b 100644 --- a/app/fetch.go +++ b/app/fetch.go @@ -1,9 +1,17 @@ package main -/* import ( "fmt" + "github.com/robfig/cron" + "time" ) -func -*/ +func run() { + c := cron.New() + c.AddFunc("@every 1m", printStatus) + c.Start() +} + +func printStatus() { + fmt.Println(time.Now()) +} |
