package cron
import "zgo.at/goatcounter/v2/cron"
Package cron schedules jobs.
Index ¶
- Variables
- func DataRetention(ctx context.Context) error
- func EmailReports(ctx context.Context) error
- func PersistAndStat(ctx context.Context) error
- func PersistInterval(d time.Duration)
- func RunBackground(ctx context.Context)
- func Stop(ctx context.Context) error
- func UpdateStats(ctx context.Context, site *goatcounter.Site, siteID int64, hits []goatcounter.Hit) error
- type Task
Variables ¶
var Tasks = []Task{ {"vacuum pageviews (data retention)", DataRetention, 1 * time.Hour}, {"renew ACME certs", renewACME, 2 * time.Hour}, {"vacuum soft-deleted sites", vacuumDeleted, 12 * time.Hour}, {"rm old exports", oldExports, 1 * time.Hour}, {"cycle sessions", sessions, 1 * time.Minute}, {"send email reports", EmailReports, 1 * time.Hour}, }
Functions ¶
func DataRetention ¶
func EmailReports ¶
EmailReports sends email reports for sites that have this configured.
func PersistAndStat ¶
func PersistInterval ¶
func RunBackground ¶
RunBackground runs tasks in the background according to the given schedule.
func Stop ¶
func UpdateStats ¶
func UpdateStats(ctx context.Context, site *goatcounter.Site, siteID int64, hits []goatcounter.Hit) error
Types ¶
type Task ¶
func (Task) ID ¶
Source Files ¶
browser_stat.go campaign_stat.go cron.go email_reports.go hit_count.go hit_stat.go language_stat.go location_stat.go ref_count.go size_stat.go system_stat.go tasks.go
- Version
- v2.3.0
- Published
- Oct 17, 2022
- Platform
- darwin/amd64
- Imports
- 23 packages
- Last checked
- 7 hours ago –
Tools for package owners.