schedulescan

package
v1.5.13 Latest Latest
Warning

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

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

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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