crond

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Crontab

type Crontab struct {
	// contains filtered or unexported fields
}

func NewCrontab

func NewCrontab(entries []Entry) *Crontab

func (*Crontab) Generate

func (c *Crontab) Generate(w io.StringWriter) error

func (*Crontab) LoadCurrent

func (c *Crontab) LoadCurrent() (string, error)

func (*Crontab) Remove

func (c *Crontab) Remove() error

func (*Crontab) Rewrite

func (c *Crontab) Rewrite() error

func (*Crontab) Update

func (c *Crontab) Update(source string, addEntries bool, w io.StringWriter) error

type Entry

type Entry struct {
	// contains filtered or unexported fields
}

Entry represents a new line in the crontab

func NewEntry

func NewEntry(event *calendar.Event, configFile, profileName, commandName, commandLine, workDir string) Entry

NewEntry creates a new crontab entry

func (Entry) Generate

func (e Entry) Generate(w io.StringWriter) error

Generate writes a cron line in the StringWriter (end of line included)

func (Entry) String

func (e Entry) String() string

String returns the crontab line representation of the entry (end of line included)

Jump to

Keyboard shortcuts

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