summaryrefslogtreecommitdiff
path: root/app/fetch.go
diff options
context:
space:
mode:
authorHorus32015-02-19 13:30:54 +0100
committerHorus32015-02-19 13:30:54 +0100
commit02e6a8b9ae3596ee1c405cdd1541c5cc59b50e3a (patch)
tree157a800cc381e78bb03b8868417db8fe12ca8239 /app/fetch.go
parentd9749f16e15739c7652b05af391af9e59e2307d6 (diff)
downloadstatuspage-02e6a8b9ae3596ee1c405cdd1541c5cc59b50e3a.tar.gz
Static file handling and autoimport the db-driver from Makefile.
Diffstat (limited to 'app/fetch.go')
-rw-r--r--app/fetch.go14
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())
+}