schtasks

package
v0.10.0 Latest Latest
Warning

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

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

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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