schtasks

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2021 License: GPL-3.0 Imports: 12 Imported by: 0

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 Close

func Close()

Close releases the ressources used by the task service

func Connect

func Connect() error

Connect initializes a connection to the local task scheduler

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 Delete

func Delete(title, subtitle string) error

Delete a task

func IsConnected added in v0.12.0

func IsConnected() bool

IsConnected returns whether a connection to the local task scheduler is established

func Status

func Status(title, subtitle string) error

Status returns the status of a task

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

Jump to

Keyboard shortcuts

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