Categorygithub.com/go-zoox/cron
modulepackage
1.2.3
Repository: https://github.com/go-zoox/cron.git
Documentation: pkg.go.dev

# README

Cron - Make Job Scheduling Easier

PkgGoDev Build Status Go Report Card Coverage Status GitHub issues Release

Installation

To install the package, run:

go get github.com/go-zoox/cron

Getting Started

import (
  "testing"
  "github.com/go-zoox/cron"
)

func main(t *testing.T) {
	c, err := cron.New()
	if err != nil {
		t.Fatal(err)
	}

	// c.AddJob("*/1 * * * *", func() {
	// 	t.Log("cron job ran at", time.Now())
	// })

	c.AddSecondlyJob(func() {
		t.Log("cron job ran at", time.Now())
	})

	c.Start()

	for {
		time.Sleep(time.Second)
	}
}

Inspired by

License

GoZoox is released under the MIT License.

# Packages

No description provided by the author

# Functions

New creates a new Cron with the given configuration.

# Variables

Version is the current version of cron.

# Structs

AddJobConfig is a configuration for AddJob.
Config is a wrapper of robCron.Config.
Cron is a schedule job, which can be used to run jobs on a schedule.

# Type aliases

AddJobOption is a function that configures the AddJob.