Skip to content

tssaini/go-agenda

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-agenda

go-agenda is a Go library that allows you to schedule jobs and persist them in a SQL database. It is inspired by the Agenda Node.js library.

Build Status Go Report Card GoDoc

Features

  • Schedules job using a cron expression
  • Stores the job metadata such as next run time, last run time and any errors produced in the SQL database

Usage

db, _ := sql.Open("mysql", "user:test@/goagenda")

agenda, _ := agenda.New(db)
agenda.Define("print hello", func() error {
    fmt.Println("Hello world")
    return nil
})
// Will run the job at the beginning of every minute
agenda.RepeatEvery("print hello", "* * * * *")
agenda.Start()

See cmd/main.go for a working example.

About

Persistent job scheduling for Golang

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published