schtasks

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2020 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Rendered for windows/amd64

Index

Constants

This section is empty.

Variables

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 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