cronjobs

package
v0.0.0-...-026aa9f Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RestartCronJob

func RestartCronJob(extReq request.ExternalRequest, db storage.Database, jobName string)

func Scheduler

func Scheduler(extReq request.ExternalRequest, db storage.Database, mutex *sync.Mutex, jobName string, cronJob CronJob, interval time.Duration)

func SendNotifications

func SendNotifications(extReq request.ExternalRequest, db storage.Database)

func SetupCronJobs

func SetupCronJobs(extReq request.ExternalRequest, db storage.Database, selectedJobs []string)

func StartCronJob

func StartCronJob(extReq request.ExternalRequest, db storage.Database, jobName string)

func StopCronJob

func StopCronJob(jobName string)

func UpdateCronJobInterval

func UpdateCronJobInterval(extReq request.ExternalRequest, db storage.Database, jobName string, number int, base string) error

Types

type CronJob

type CronJob func(extReq request.ExternalRequest, db storage.Database)

type CronJobObject

type CronJobObject struct {
	CronJob  CronJob
	Interval time.Duration
}

type StartCronJobRequest

type StartCronJobRequest struct {
	Name           string `json:"name" validate:"required"`
	IntervalNumber int    `json:"interval_number"`
	IntervalBase   string `json:"interval_base"`
}

type UpdateCronJobRequest

type UpdateCronJobRequest struct {
	Name           string `json:"name" validate:"required"`
	IntervalNumber int    `json:"interval_number" validate:"required"`
	IntervalBase   string `json:"interval_base" validate:"required,oneof=second minute hour day week month year"`
}

Jump to

Keyboard shortcuts

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