scheduled_task

package
v0.0.0-...-b6f583f Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Rendered for windows/amd64

Index

Constants

View Source
const (
	Name = "scheduled_task"

	FlagScheduledTaskExclude = "collector.scheduled_task.exclude"
	FlagScheduledTaskInclude = "collector.scheduled_task.include"
)
View Source
const (
	TASK_STATE_UNKNOWN TaskState = iota
	TASK_STATE_DISABLED
	TASK_STATE_QUEUED
	TASK_STATE_READY
	TASK_STATE_RUNNING
	TASK_RESULT_SUCCESS TaskResult = 0x0
)
View Source
const SCHEDULED_TASK_PROGRAM_ID = "Schedule.Service.1"
View Source
const S_FALSE = 0x00000001

S_FALSE is returned by CoInitialize if it was already called on this thread.

Variables

View Source
var ConfigDefaults = Config{
	TaskExclude: "",
	TaskInclude: ".+",
}
View Source
var TASK_STATES = []string{"disabled", "queued", "ready", "running", "unknown"}

Functions

func New

func New(logger log.Logger, config *Config) types.Collector

func NewWithFlags

func NewWithFlags(app *kingpin.Application) types.Collector

Types

type Config

type Config struct {
	TaskExclude string `yaml:"task_exclude"`
	TaskInclude string `yaml:"task_include"`
}

type ScheduledTask

type ScheduledTask struct {
	Name            string
	Path            string
	Enabled         bool
	State           TaskState
	MissedRunsCount float64
	LastTaskResult  TaskResult
}

RegisteredTask ...

type ScheduledTasks

type ScheduledTasks []ScheduledTask

type TaskResult

type TaskResult uint

Jump to

Keyboard shortcuts

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