jobs

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2016 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddJob

func AddJob(spec string, job *Job) string

func GetEntries

func GetEntries(size int) []*antcron.Entry

func GetEntryById

func GetEntryById(id int) *antcron.Entry

func GetLocalIp

func GetLocalIp() string

func InitOneJobByTaskId

func InitOneJobByTaskId(taskId int) string

func RemoveJob

func RemoveJob(id int) bool

*

TODO callback func can't change var

Types

type Job

type Job struct {
	Concurrent bool
	// contains filtered or unexported fields
}

func NewCommandJob

func NewCommandJob(id int, name string, command string) *Job

func NewJobFromTask

func NewJobFromTask(task *models.Task) (*Job, error)

func (*Job) GetId

func (j *Job) GetId() int

func (*Job) GetLogId

func (j *Job) GetLogId() int64

func (*Job) GetName

func (j *Job) GetName() string

func (*Job) GetPid

func (j *Job) GetPid() int

func (*Job) Run

func (j *Job) Run()

func (*Job) Status

func (j *Job) Status() int

Jump to

Keyboard shortcuts

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