Gocron

1 개요[ | ]

gocron
  • Go언어 작업 스케줄링 패키지
package main

import (
	"fmt"
	"time"

	"github.com/go-co-op/gocron"
)

func main() {
	s := gocron.NewScheduler(time.UTC)
	s.Every(1).Seconds().Do(func() { fmt.Println(time.Now()) })
	s.StartAsync()
    // s.StartBlocking()
	time.Sleep(5 * time.Second)
}

2 같이 보기[ | ]

3 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}