Skip to content

Latest commit

 

History

History
39 lines (25 loc) · 773 Bytes

README.md

File metadata and controls

39 lines (25 loc) · 773 Bytes

task-master.go

customizable task execution system and library written in go with no dependancy

CodeQL


Usage

go get github.com/dev-asterix/task-master.go

simple scheduler based on time interval

package main

import (
    "github.com/dev-asterix/task-master.go/scheduler"
)

func main() {
    // create a new scheduler
    s := scheduler.NewIntervalBased(10, scheduler.Second)

    for {

        // run tasks

        s.Schedule() // calculate next schedule and wait for it
        // runs after scheduled interval (here, 10 seconds)
    }
}

Code.Share.Prosper