重新设计Crontabex

This commit is contained in:
huangsimin 2019-07-18 18:38:14 +08:00
parent 88b8d4030f
commit c6d2fa906c
3 changed files with 32 additions and 0 deletions

15
crontab.go Normal file
View File

@ -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 {
}

7
crontab_test.go Normal file
View File

@ -0,0 +1,7 @@
package crontabex
import "testing"
func TestCrontabex(t *testing.T) {
}

10
plan_time.go Normal file
View File

@ -0,0 +1,10 @@
package crontabex
// PlanTime
type PlanTime struct {
}
// TrieTime
type TrieTime struct {
everyYear int
}