cronJob

package
v0.0.0-...-d6daade Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitializeCronJobs

func InitializeCronJobs(srvs *service.Services, repos *repository.Repositories) *cron.Cron

InitializeCronJobs loads jobs from the database and sets up the cron scheduler

Types

type AnnounceNewAnimeCronJob

type AnnounceNewAnimeCronJob struct {
	FunctionName string
	Expression   string
	LastRun      *time.Time
	NextRun      *time.Time
	// contains filtered or unexported fields
}

AnnounceNewAnimeCronJob struct implements CronJobInterface

func NewAnnounceNewAnimeCronJob

func NewAnnounceNewAnimeCronJob(blueSkySrv *blueSkySrv.BlueSkyService) *AnnounceNewAnimeCronJob

NewAnnounceNewAnimeCronJob creates a new AnnounceNewAnimeCronJob instance

func (*AnnounceNewAnimeCronJob) GetCronExpression

func (j *AnnounceNewAnimeCronJob) GetCronExpression() string

CronExpression returns the cron expression for the job

func (*AnnounceNewAnimeCronJob) Handler

func (j *AnnounceNewAnimeCronJob) Handler(params map[string]interface{}, args ...interface{}) error

Handler executes the job logic

func (*AnnounceNewAnimeCronJob) SetCronExpression

func (j *AnnounceNewAnimeCronJob) SetCronExpression(expression string)

type CronJobInterface

type CronJobInterface interface {
	GetCronExpression() string
	SetCronExpression(string)
	Handler(params map[string]interface{}, args ...interface{}) error
}

type ImportScheduledAnimeCronJob

type ImportScheduledAnimeCronJob struct {
	FunctionName string
	Expression   string
	LastRun      *time.Time
	NextRun      *time.Time
	// contains filtered or unexported fields
}

ImportScheduledAnimeCronJob struct implements CronJobInterface

func NewImportScheduledAnimeCronJob

func NewImportScheduledAnimeCronJob(aniListSrv *AniListSrv.AniListService) *ImportScheduledAnimeCronJob

NewImportScheduledAnimeCronJob creates a new ImportScheduledAnimeCronJob instance

func (*ImportScheduledAnimeCronJob) GetCronExpression

func (j *ImportScheduledAnimeCronJob) GetCronExpression() string

CronExpression returns the cron expression for the job

func (*ImportScheduledAnimeCronJob) Handler

func (j *ImportScheduledAnimeCronJob) Handler(params map[string]interface{}, args ...interface{}) error

Handler executes the job logic

func (*ImportScheduledAnimeCronJob) SetCronExpression

func (j *ImportScheduledAnimeCronJob) SetCronExpression(expression string)

type TestCronJob

type TestCronJob struct {
	FunctionName string
	Expression   string
	LastRun      *time.Time
	NextRun      *time.Time
}

TestCronJob struct implements CronJobInterface

func NewTestCronJob

func NewTestCronJob() *TestCronJob

NewTestCronJob creates a new TestCronJob instance

func (*TestCronJob) GetCronExpression

func (j *TestCronJob) GetCronExpression() string

CronExpression returns the cron expression for the job

func (*TestCronJob) Handler

func (j *TestCronJob) Handler(params map[string]interface{}, args ...interface{}) error

Handler executes the job logic

func (*TestCronJob) SetCronExpression

func (j *TestCronJob) SetCronExpression(expression string)

Jump to

Keyboard shortcuts

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