Documentation
¶
Overview ¶
Package cronjob loads and runs workspace cronjob prompts.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Manager ¶
type Manager struct {
SendSlackChannel func(context.Context, string, string, string, string, string, []events.OutboundAttachment) error
// contains filtered or unexported fields
}
Manager loads cron definitions once at startup and schedules them.
func (*Manager) LoadOneOffCronjob ¶
func (m *Manager) LoadOneOffCronjob(target string) (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 OneOffCronjob, progress *harnessbridge.RawRunProgress, finish func(context.Context, RunResult, error))
RunOneOffCronjob executes a loaded cronjob once with optional progress delivery.
type OneOffCronjob ¶
type OneOffCronjob struct {
Agent, Prompt, RelativePath, SlackChannel string
}
OneOffCronjob captures a live one-off cronjob prompt loaded from disk.
type RunFunc ¶
type RunFunc func(context.Context, string, string, *slog.Logger, *harnessbridge.RawRunProgress) (RunResult, error)
RunFunc executes one cronjob prompt and returns the cronjob result.
type RunResult ¶
type RunResult struct {
Text, VerbatimMessage string
Attachments []events.OutboundAttachment
}
RunResult captures the observable result of one cronjob run.
Click to show internal directories.
Click to hide internal directories.