Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager coordinates cron-based scheduling, allowing multiple schedule entries to share the same crontab expression while maintaining independent IDs.
func NewManager ¶
NewManager creates a new cron Manager with the given context and logger.
func (*Manager) Add ¶
func (m *Manager) Add(schedule shtypes.ScheduleEntry)
Add registers a schedule entry. If the crontab expression is already registered, the schedule ID is added to the existing entry. Otherwise, a new cron job is created. Invalid crontab expressions are logged and ignored.
func (*Manager) Remove ¶
func (m *Manager) Remove(schedule shtypes.ScheduleEntry)
Remove unregisters a schedule entry. If this is the last schedule ID using the crontab expression, the underlying cron job is stopped and removed.
Click to show internal directories.
Click to hide internal directories.