Documentation
¶
Rendered for windows/amd64
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrorNotConnected = errors.New("local task scheduler not connected")
ErrorNotConnected is returned by public functions if Connect was not called, was not successful or Close closed the connection.
View Source
var (
ErrorNotRegistered = errors.New("task is not registered")
)
Common errors
Functions ¶
func Create ¶
func Create(config Config, schedules []*calendar.Event, permission Permission) error
Create or update a task (if the name already exists in the Task Scheduler)
func IsConnected ¶ added in v0.12.0
func IsConnected() bool
IsConnected returns whether a connection to the local task scheduler is established
Types ¶
type Config ¶
type Config interface {
Title() string
SubTitle() string
JobDescription() string
TimerDescription() string
Schedules() []string
Permission() string
WorkingDirectory() string
Command() string
Arguments() []string
}
Config contains all the information needed to schedule a Job
type Permission ¶
type Permission int
Permission is a choice between User and System
const ( UserAccount Permission = iota SystemAccount )
Permission available
Click to show internal directories.
Click to hide internal directories.