cron

package
v0.0.0-...-c2d5bd4 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cron

type Cron struct {
	RedisClient *redis.Client
	Ctx         context.Context `json:"-"`
	EpochStart  int64           `json:"epochStart"`
	EpochEnd    int64           `json:"epochEnd"`
	Duration    int64           `json:"duration"`
	Md5Hash     string          `json:"md5Hash"`
	Args        []string        `json:"args"`
	Status      string          `json:"status"`
	Pid         int             `json:"pid"`
	Error       string          `json:"error"`
}

func New

func New(args []string) *Cron

func (Cron) MarshalBinary

func (c Cron) MarshalBinary() ([]byte, error)

MarshalBinary automatically marshals the cron object into a JSON object to be stored in Redis

func (*Cron) Run

func (c *Cron) Run() error

func (*Cron) UnmarshalBinary

func (c *Cron) UnmarshalBinary(data []byte) error

UnmarshalBinary automatically unmarshals the cron object from a JSON object stored in Redis

Jump to

Keyboard shortcuts

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