|
|
@@ -16,7 +16,7 @@ type Cron struct {
|
|
|
add chan *Entry
|
|
|
snapshot chan []*Entry
|
|
|
running bool
|
|
|
- ErrorLog *log.Logger
|
|
|
+ ErrorLog Logger
|
|
|
location *time.Location
|
|
|
}
|
|
|
|
|
|
@@ -32,6 +32,11 @@ type Schedule interface {
|
|
|
Next(time.Time) time.Time
|
|
|
}
|
|
|
|
|
|
+// Logger is a Logger interface.
|
|
|
+type Logger interface {
|
|
|
+ Printf(format string, v ...interface{})
|
|
|
+}
|
|
|
+
|
|
|
// Entry consists of a schedule and the func to execute on that schedule.
|
|
|
type Entry struct {
|
|
|
// The schedule on which this job should be run.
|