Chrono|Docs

Cron schedules

Run tasks from cron expressions

Use cron timing

Use ScheduleWithCron when a task should run from a calendar expression.

main.go
scheduler.ScheduleWithCron(func(ctx context.Context) {
	println("generate daily report")
}, "0 30 9 * * *")

Cron schedules are useful for daily reports, nightly cleanup, recurring maintenance, billing windows, and scheduled notifications.

Add a location

When the schedule depends on local time, pass WithLocation.

main.go
scheduler.ScheduleWithCron(func(ctx context.Context) {
	println("start morning job")
}, "0 0 9 * * *", chrono.WithLocation("Europe/Istanbul"))

This keeps the cron expression readable while making the intended time zone explicit.