scheduler

package
v0.0.40 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2022 License: GPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateNewSchedule

func CreateNewSchedule(schedule database.Schedule) error

Creates and starts a schedule based on the provided input data

func GetUserScheduleById

func GetUserScheduleById(username string, id uint) (database.Schedule, bool, error)

Gets a schedule based on its id and its owner's username

func Init

func Init() error

func InitLogger

func InitLogger(logger *logrus.Logger)

func ModifyScheduleById

func ModifyScheduleById(id uint, newSchedule database.Schedule) error

Modify an already set up schedule

func RemoveScheduleById

func RemoveScheduleById(id uint) error

Aborts and deletes a schedule based on its id

Types

type UserSchedule

type UserSchedule struct {
	Id             uint   `json:"id"`
	Name           string `json:"name"`
	Hour           uint   `json:"hour"`
	Minute         uint   `json:"minute"`
	NextRun        string `json:"nextRun"`
	HomescriptCode string `json:"homescriptCode"` // Will be executed if the scheduler runs the job
}

Used for listing personal schedules

Jump to

Keyboard shortcuts

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