Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedCron ¶
type RedCron struct {
// contains filtered or unexported fields
}
RedCron registers and runs cron jobs.
func (*RedCron) Register ¶ added in v0.3.0
func (c *RedCron) Register(name string, repeatSec int, offsetSec int, f func(context.Context)) *RedCron
Register registers a new cron job by the given parameters. It returns the underlying RedCron. If the underlying RedCron is stopped, registered cron jobs won't be triggered.
Click to show internal directories.
Click to hide internal directories.