cronfrontend

package
v0.1.59 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package cronfrontend schedules cron producers and their conversation Sync.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateRuntimeDefinitions

func ValidateRuntimeDefinitions(workspace, runtimeDir string, channels []string) error

ValidateRuntimeDefinitions loads cron definitions from runtimeDir without mutating scheduler state.

Types

type Job

type Job struct {
	RelativePath, Agent, TextChannel, Body, Space string
	Schedules                                     []string
	Upcoming                                      []time.Time
}

Job is the read-only presentation of a loaded definition and its next triggers.

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager loads and runs workspace cron definitions.

func New

func New(workspace, runtimeDir string, channels []string, store cronScheduleStore, run Runner, logger *slog.Logger) *Manager

New constructs a cronjob manager using runtimeDir for effective runtime cron definitions.

func (*Manager) Jobs

func (m *Manager) Jobs() ([]Job, error)

Jobs returns loaded definitions and their next triggers in the next day. It neither refreshes scheduler state nor claims any work.

func (*Manager) LoadOneOffCronjob

func (m *Manager) LoadOneOffCronjob(target string) (protocol.OneOffCronjob, error)

LoadOneOffCronjob resolves and loads one live cronjob for a managed Slack thread run.

func (*Manager) RunOneOffCronjob

func (m *Manager) RunOneOffCronjob(ctx context.Context, job *protocol.OneOffCronjob) (protocol.CronRunResult, error)

RunOneOffCronjob waits for a loaded producer and its required Sync.

func (*Manager) Start

func (m *Manager) Start(ctx context.Context) error

Start loads cron definitions and starts scheduling them.

func (*Manager) Stop

func (m *Manager) Stop(ctx context.Context) error

Stop shuts the cron manager down.

type Runner

Runner executes a producer through terminal delivery.

Jump to

Keyboard shortcuts

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