"Gocron"의 두 판 사이의 차이

(새 문서: ==개요== ;gocron <syntaxhighlight lang='go' run> package main import ( "fmt" "time" "github.com/go-co-op/gocron" ) func main() { s := gocron.NewScheduler(time.UTC) s.Every(...)
 
 
(같은 사용자의 중간 판 하나는 보이지 않습니다)
1번째 줄: 1번째 줄:
==개요==
==개요==
;gocron
;gocron
* Go언어 작업 스케줄링 패키지


<syntaxhighlight lang='go' run>
<syntaxhighlight lang='go' run>
16번째 줄: 17번째 줄:
s.Every(1).Seconds().Do(func() { fmt.Println(time.Now()) })
s.Every(1).Seconds().Do(func() { fmt.Println(time.Now()) })
s.StartAsync()
s.StartAsync()
    // s.StartBlocking()
time.Sleep(5 * time.Second)
time.Sleep(5 * time.Second)
}
}

2022년 5월 18일 (수) 03:04 기준 최신판

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