chronos-go

Go client for Chronos

Chronos Client

chronos-go is an API client for Chronos written in Go.

go get github.com/gocardless/chronos-go

Example

Create a task that executed inside a Docker container:

package main

import (
    "log"

    "github.com/gocardless/chronos-go"
)

func main() {
    j := chronos.NewJob()

    j.Name = "DockerTest"
    j.Owner = "[email protected]"
    j.Command = "/usr/bin/uptime"
    j.Container = chronos.NewContainer("ubuntu:trusty")
    j.Schedule = "R/2014-12-15T16:00:00/PT24H"
    j.Epsilon = "PT24H"

    err := j.Create()
    if err != nil {
        log.Fatalf("unable to create job: %s\n", err)
    }

    log.Println(j)
}

Related Repositories

chronos-client

chronos-client

A Go Chronos client library ...

chronos-go

chronos-go

Go client for Chronos ...

chronos-go

chronos-go

Rewrite chronos in Golang, simplified and more reliable. ...