task

package
v0.0.0-...-df8abf9 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddJob

func AddJob(spec string, job *Job) bool

func ConnectByRsa

func ConnectByRsa(user string, host string, port int) (*ssh.Session, *ssh.Client, error)

func ConnectByUser

func ConnectByUser(user, password, host string, port int) (*ssh.Session, *ssh.Client, error)

func ConvertToString

func ConvertToString(src string, srcCode string, tagCode string) string

func GetEntries

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

func GetEntryById

func GetEntryById(id int) *cron.Entry

func Init

func Init()

func IsWin

func IsWin() bool

func RemoveJob

func RemoveJob(id int)

Types

type Job

type Job struct {
	Concurrent bool // 同一个任务是否允许并行执行
	// contains filtered or unexported fields
}

func NewCommandJob

func NewCommandJob(cron *models.AppCron) *Job

func NewJobFromTask

func NewJobFromTask(cron *models.AppCron) (*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) 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