From c6d2fa906c0dd05c05fc63fbe6aafb9d754538a2 Mon Sep 17 00:00:00 2001 From: huangsimin Date: Thu, 18 Jul 2019 18:38:14 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=96=B0=E8=AE=BE=E8=AE=A1Crontabex?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crontab.go | 15 +++++++++++++++ crontab_test.go | 7 +++++++ plan_time.go | 10 ++++++++++ 3 files changed, 32 insertions(+) create mode 100644 crontab.go create mode 100644 crontab_test.go create mode 100644 plan_time.go diff --git a/crontab.go b/crontab.go new file mode 100644 index 0000000..92310ac --- /dev/null +++ b/crontab.go @@ -0,0 +1,15 @@ +package crontabex + +import "time" + +// ICrontab 时间到 +type ICrontab interface { + TimeIsUp() bool + NextTime() time.Time + Set(...interface{}) // 默认不忽略 + Get(...interface{}) +} + +// Crontab +type Crontab struct { +} diff --git a/crontab_test.go b/crontab_test.go new file mode 100644 index 0000000..81d21f5 --- /dev/null +++ b/crontab_test.go @@ -0,0 +1,7 @@ +package crontabex + +import "testing" + +func TestCrontabex(t *testing.T) { + +} diff --git a/plan_time.go b/plan_time.go new file mode 100644 index 0000000..eff9021 --- /dev/null +++ b/plan_time.go @@ -0,0 +1,10 @@ +package crontabex + +// PlanTime +type PlanTime struct { +} + +// TrieTime +type TrieTime struct { + everyYear int +}