crontab

package
v0.0.0-...-87345f3 Latest Latest
Warning

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

Go to latest
Published: May 26, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsCrontabStringValid

func IsCrontabStringValid(crontabStr string) bool

func TriggeredTimeFlag

func TriggeredTimeFlag(theTime time.Time) string

TriggeredTimeFlag theTime是一个具体的时间,返回的是当前精度支持下的词时间的表达 目前被crontab watcher那边用来做并发安全控制的标识 目前支持的是分钟级别,所以返回表达式也是到分钟 如果后续改到秒,此地修改就行。避免还要到对应使用者去修改

Types

type CrontabRepresent

type CrontabRepresent struct {
	CrontabStr string
	// contains filtered or unexported fields
}

func BuildCrontab

func BuildCrontab(iptString string) *CrontabRepresent

func (*CrontabRepresent) Equal

func (cr *CrontabRepresent) Equal(crB *CrontabRepresent) bool

func (*CrontabRepresent) IsValid

func (cr *CrontabRepresent) IsValid() bool

func (*CrontabRepresent) IsZero

func (cr *CrontabRepresent) IsZero() bool

func (*CrontabRepresent) String

func (cr *CrontabRepresent) String() string

func (*CrontabRepresent) TimeMatched

func (cr *CrontabRepresent) TimeMatched(theTime time.Time) bool

分钟 小时 dayofmonth month dayofweek

Jump to

Keyboard shortcuts

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