schtasks

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: GPL-3.0 Imports: 14 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.ScheduleConfig, 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 Permission

type Permission int

Permission is a choice between System, User and User Logged On

const (
	UserAccount Permission = iota
	SystemAccount
	UserLoggedOnAccount
)

Permission available

Jump to

Keyboard shortcuts

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