crontab

package
v1.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Timezone string
	Tasks    []Task
}

Config crontab config

type Logger

type Logger struct {
	Log log.Logger
}

func (Logger) Error

func (l Logger) Error(err error, msg string, keysAndValues ...interface{})

func (Logger) Info

func (l Logger) Info(msg string, keysAndValues ...interface{})

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server crontab server

func NewServer

func NewServer(jobs map[string]cron.Job, logger cron.Logger) *Server

NewServer new a crontab server

func (*Server) Start

func (s *Server) Start(ctx context.Context) error

Start the crontab server

func (*Server) Stop

func (s *Server) Stop(ctx context.Context) error

Stop the crontab server

type Task

type Task struct {
	Name     string
	Schedule string
}

Task crontab task

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL