cronjobs

package module
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2020 License: MIT Imports: 9 Imported by: 6

README

DB-Journey Cronjobs

This package in intended to run scheduled cron jobs on databases. It abstracts the driver layer like the db-journey/migrate package

Check db-journey/journey cli for concrete example, with a specific logging.

Documentation

Overview

Package cronjobs provides a way to schedule DB jobs, using cron specs. see https://godoc.org/github.com/robfig/cron for more info on cron spec format. The package relies (for now) on files located in a folder passed as an argument to ReadFiles. The files can have any extention, and must contain a first line with the cron spec: "[...]cron: [spec]" ex: "-- cron: @daily" for sql The line can start with any comment chars, and must end with the spec.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(driver driver.Driver) *scheduler

New creates a new cron scheduler

Types

type Run

type Run struct {
	Name     string
	Error    error
	Duration time.Duration
}

Run defines an entry that will be created from each job for logging

Jump to

Keyboard shortcuts

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