Socket
Socket
Sign inDemoInstall

github.com/onatm/clockwerk

Package Overview
Dependencies
0
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    github.com/onatm/clockwerk

Package clockwerk implements an in-process scheduler for periodic jobs. Callers may register Jobs to be invoked on a given schedule. Clockwerk will run them in their own goroutines.


Version published

Readme

Source

clockwerk

Build Status   Coverage Status   Go Report Card   GoDoc

Job Scheduling Library

clockwerk allows you to schedule periodic jobs using a simple, fluent syntax.

Usage

go get github.com/onatm/clockwerk
package main

import (
  "fmt"
  "time"
  "github.com/onatm/clockwerk"
)

type DummyJob struct{}

func (d DummyJob) Run() {
  fmt.Println("Every 30 seconds")
}

func main() {
  var job DummyJob
  c := clockwerk.New()
  c.Every(30 * time.Second).Do(job)
  c.Start()
}

FAQs

Last updated on 10 Sep 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc