mirror of
https://github.com/rfyiamcool/cronlib.git
synced 2025-10-05 03:06:49 +08:00
21 lines
268 B
Go
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)
|
|
}
|
|
|