luci: Index | Files

package cron

import ""

Package cron can runs functions periodically.


Package Files


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 2021-01-25. Refresh now. Tools for package owners.