luci: go.chromium.org/luci/resultdb/internal/cron Index | Files

package cron

import "go.chromium.org/luci/resultdb/internal/cron"

Package cron can runs functions periodically.

Index

Package Files

cron.go

func Group Uses

func Group(ctx context.Context, replicas int, minInterval time.Duration, f func(ctx context.Context, replica int) error)

Group runs multiple cron jobs concurrently. See also Run function.

func Run Uses

func Run(ctx context.Context, minInterval time.Duration, f func(context.Context) error)

Run runs f repeatedly, until the context is cancelled.

Ensures f is not called too often (minInterval).

Package cron imports 8 packages (graph) and is imported by 4 packages. Updated 2020-10-01. Refresh now. Tools for package owners.