Documentation ¶
Index ¶
- type CronsModel
- func (o *CronsModel) Cron() gocron.Scheduler
- func (c *CronsModel) CronJob(spec string, fn ...func())
- func (c *CronsModel) DailyJob(interval uint, hours []uint, minute uint, fn ...func())
- func (c *CronsModel) Day(fn ...func())
- func (c *CronsModel) DayHour(hour int, fn ...func())
- func (c *CronsModel) DayHourMinute(hour, minute int, fn ...func())
- func (c *CronsModel) DurationJob(seconds int, fn ...func())
- func (c *CronsModel) DurationRandomJob(minDuration, maxDuration time.Duration, fn ...func())
- func (c *CronsModel) Hour(fn ...func())
- func (c *CronsModel) HourX(x int, fn ...func())
- func (c *CronsModel) Minute(fn ...func())
- func (c *CronsModel) MinuteX(x int, fn ...func())
- func (c *CronsModel) MonthlyJob(interval uint, daysOfTheMonth []int, hours []uint, minutes uint, fn ...func())
- func (c *CronsModel) OneTimeJobForMinute(minute uint, fn ...func())
- func (c *CronsModel) OneTimeJobForSeconds(seconds uint, fn ...func())
- func (c *CronsModel) Second(fn ...func())
- func (c *CronsModel) SecondX(x int, fn ...func())
- func (c *CronsModel) Start()
- func (c *CronsModel) Stop() error
- func (c *CronsModel) WeeklyJob(interval uint, daysOfTheWeek []time.Weekday, hours []uint, minutes uint, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CronsModel ¶
type CronsModel struct {
// contains filtered or unexported fields
}
func New ¶
func New() (*CronsModel, error)
func (*CronsModel) Cron ¶
func (o *CronsModel) Cron() gocron.Scheduler
func (*CronsModel) CronJob ¶ added in v1.1.2
func (c *CronsModel) CronJob(spec string, fn ...func())
spec is crontab pattern crontab 表达式
func (*CronsModel) DailyJob ¶ added in v1.1.2
func (c *CronsModel) DailyJob(interval uint, hours []uint, minute uint, fn ...func())
每天定时执行
func (*CronsModel) DayHour ¶
func (c *CronsModel) DayHour(hour int, fn ...func())
crontab 每天x点0分0秒执行
func (*CronsModel) DayHourMinute ¶
func (c *CronsModel) DayHourMinute(hour, minute int, fn ...func())
crontab 每天x点x分0秒执行
func (*CronsModel) DurationJob ¶ added in v1.1.2
func (c *CronsModel) DurationJob(seconds int, fn ...func())
隔多少秒执行
func (*CronsModel) DurationRandomJob ¶ added in v1.1.2
func (c *CronsModel) DurationRandomJob(minDuration, maxDuration time.Duration, fn ...func())
DurationRandomJob 定义一个新作业,该作业以提供的最小和最大持续时间值之间的随机间隔运行
func (*CronsModel) MonthlyJob ¶ added in v1.1.2
func (c *CronsModel) MonthlyJob(interval uint, daysOfTheMonth []int, hours []uint, minutes uint, fn ...func())
interval 月频, 0-6-->周日 周一 ... 周六, hours 具体执行时间列表
func (*CronsModel) OneTimeJobForMinute ¶ added in v1.1.2
func (c *CronsModel) OneTimeJobForMinute(minute uint, fn ...func())
当前时间 minute 分钟之后执行一次
func (*CronsModel) OneTimeJobForSeconds ¶ added in v1.1.2
func (c *CronsModel) OneTimeJobForSeconds(seconds uint, fn ...func())
当前时间 seconds 秒之后执行一次
func (*CronsModel) Start ¶
func (c *CronsModel) Start()
func (*CronsModel) Stop ¶
func (c *CronsModel) Stop() error
Click to show internal directories.
Click to hide internal directories.