Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func WithLogger ¶
func WithLogger(shouldLog bool) cron.Logger
Types ¶
type CronOptions ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager: A struct that manages cron jobs
func NewManager ¶
NewManager: Creates a new cron manager
func (*Manager) Add ¶
func (m *Manager) Add(opts CronOptions) error
Add: Adds a cron job to the manager
type WeakWrapper ¶
type WeakWrapper interface { // GetID: Returns the ID of the cron job GetID() cron.EntryID // SetID: Sets the ID of the cron job SetID(id cron.EntryID) // Schedule: The schedule of the cron job Schedule() string // Code: The code of the cron job Code() func() // IsEnabled: Whether or not the cron job is enabled IsEnabled() bool // IsDisabled: Whether or not the cron job is disabled IsDisabled() bool // SetStatus: Sets the status of the cron job SetStatus(status bool) }
WeakWrapper is a wrapper for a specified cron job
func NewWeakWrapper ¶
func NewWeakWrapper(name, schedule string, id cron.EntryID, cmd func()) WeakWrapper
Click to show internal directories.
Click to hide internal directories.