cron-schedule-builder

utilities for making cron schedule text format.

Install

go install github.com/TakeruTakeru/cron-schedule-builder

import (
    "github.com/TakeruTakeru/cron-schedule-builder"
)

Example

// from January to April, first day of month, while PM1 to PM2, every 10 minutes...
schedule := NewCronSchedule().Days(1).MonthsRange(time.January, time.April).Hours(13, 14).MinutesInterval(10)

// */10 13,14 1 1-4 *
fmt.Println(schedule)

License

MIT

GitHub

View Github