goo_cron

package
v1.1.69 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

README

定时任务

goo_cron.Minute(func() {
    log.Println("Minute - 1")
}, func() {
    log.Println("Minute - 2")
}).MinuteX(2, func() {
    log.Println("MinuteX - 1")
}, func() {
    log.Println("MinuteX - 2")
}).Start()

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cron

func Cron() *cron.Cron

func Day

func Day(fn ...func()) *crontab

每天0点0分0秒执行

func DayHour

func DayHour(hour int, fn ...func()) *crontab

每天x点0分0秒执行

func DayHourMinute

func DayHourMinute(hour, minute int, fn ...func()) *crontab

每天x点x分0秒执行

func Hour

func Hour(fn ...func()) *crontab

每小时执行

func HourX

func HourX(x int, fn ...func()) *crontab

每隔x小时执行

func Minute

func Minute(fn ...func()) *crontab

每分钟执行

func MinuteX

func MinuteX(x int, fn ...func()) *crontab

每隔x分钟执行

func Second

func Second(fn ...func()) *crontab

每秒钟执行

func SecondX

func SecondX(x int, fn ...func()) *crontab

每隔x秒执行

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL