cron

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCall

func AddCall(scall model.SchedulableCall)

AddCall - Add a http call to the list of cron entries

func AddJob

func AddJob(sjob model.SchedulableJob)

AddJob - Add a Runnable job to the list of cron entries

func DeleteCallByNameAndSpaceGuid

func DeleteCallByNameAndSpaceGuid(callname, spaceGuid string)

DeleteCallByNameAndSpaceGuid - Delete a Runnable job from the list of cron Entries

func DeleteCallByScheduleGuid

func DeleteCallByScheduleGuid(scheduleGuid string)

DeleteCallByScheduleGuid - Delete a Runnable call from the list of cron Entries

func DeleteJobByNameAndSpaceGuid

func DeleteJobByNameAndSpaceGuid(jobname, spaceGuid string)

DeleteJobByNameAndSpaceGuid - Delete a Runnable job from the list of cron Entries

func DeleteJobByScheduleGuid

func DeleteJobByScheduleGuid(scheduleGuid string)

DeleteJobByScheduleGuid - Delete a Runnable job from the list of cron Entries

func DoCall

func DoCall(scheduledTime time.Time, call model.SchedulableCall)

func DoJob

func DoJob(scheduledTime time.Time, job model.SchedulableJob)

func StartHousekeeping

func StartHousekeeping()

StartHousekeeping - This function starts a loop in his own routine to query cf tasks, and update the histories table with the task state and message, and to clean up histories and schedules table.

func StartRunner

func StartRunner()

StartRunner - The main function to start the cron job. It will start reading the database for schedules and add them all to cron.

Types

type Call

type Call struct {
	// contains filtered or unexported fields
}

func (Call) Run

func (call Call) Run()

Run - This function is required for Call and will be called by cron.Cron

type Job

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

func (Job) Run

func (job Job) Run()

Run - This function is required for Job and will be called by cron.Cron

Jump to

Keyboard shortcuts

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