Files
cronlib/example/parse_time/parse_next_time.go
2020-08-04 17:56:06 +08:00

21 lines
268 B
Go

package main
import (
"fmt"
"time"
"github.com/rfyiamcool/cronlib"
)
func main() {
t, err := cronlib.Parse("0 0 0 */1 * *")
if err != nil {
panic(err.Error())
}
fmt.Println(" now: ", time.Now())
next := t.Next(time.Now())
fmt.Println("next: ", next)
}