schedulescan

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package schedulescan finds stored cron schedules that can never fire, for rows saved before save time validation existed. It only reports.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogWarnings

func LogWarnings(ctx context.Context, src Source, logger *slog.Logger, now time.Time)

LogWarnings runs Scan once and logs one warning per offending schedule. Nothing is disabled: the owner decides whether to edit or delete it.

Types

type Finding

type Finding struct {
	Kind   string // database_backup, volume_backup, app_deploy or scheduled_task
	ID     string
	App    string
	Expr   string
	Reason string
}

Finding is one stored schedule with no future occurrence.

func Scan

func Scan(ctx context.Context, src Source, now time.Time) ([]Finding, error)

Scan checks every stored schedule once. A list failure is returned with whatever was found before it, so one broken table hides nothing else.

type Source

type Source interface {
	ListScheduledDatabases(ctx context.Context) ([]store.DesiredDatabase, error)
	ListScheduledServiceVolumes(ctx context.Context) ([]store.ServiceVolumeBackupConfig, error)
	ListEnabledAppSchedules(ctx context.Context) ([]store.AppSchedule, error)
	ListEnabledScheduledTasks(ctx context.Context) ([]store.ScheduledTask, error)
}

Source is the narrow store surface the scan reads.

Jump to

Keyboard shortcuts

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