Documentation
¶
Index ¶
- Variables
- func CallFunc(funcName string) (e error)
- func CallFuncWithParams(funcName string, params []interface{}) (e error)
- func HandleErrFunc(values []reflect.Value) (e error)
- func LoadJobsFromPersistentStorage(c *Config)
- type Config
- type Jobs
- func (j *Jobs) At(time string) *Jobs
- func (j *Jobs) CronFormat(cron string) *Jobs
- func (j *Jobs) Daily() *Jobs
- func (j *Jobs) DailyAt(time string) *Jobs
- func (j *Jobs) Do() (id primitive.ObjectID, e error)
- func (j *Jobs) EveryFifteenMinutes() *Jobs
- func (j *Jobs) EveryFiveMinutes() *Jobs
- func (j *Jobs) EveryMinute() *Jobs
- func (j *Jobs) EverySixHours() *Jobs
- func (j *Jobs) EveryTenMinutes() *Jobs
- func (j *Jobs) EveryThirtyMinutes() *Jobs
- func (j *Jobs) EveryThreeHours() *Jobs
- func (j *Jobs) EveryTwelveHours() *Jobs
- func (j *Jobs) Hourly() *Jobs
- func (j *Jobs) Monthly() *Jobs
- func (j *Jobs) MonthlyOn(time string) *Jobs
- func (j *Jobs) Quarterly() *Jobs
- func (j *Jobs) Weekly() *Jobs
- func (j *Jobs) WeeklyOn(time string) *Jobs
- func (j *Jobs) Yearly() *Jobs
Constants ¶
This section is empty.
Variables ¶
View Source
var FuncStorage = make(map[string]interface{})
View Source
var ScheduleStorage = make(map[string]interface{})
Functions ¶
func CallFuncWithParams ¶
func HandleErrFunc ¶
func LoadJobsFromPersistentStorage ¶
func LoadJobsFromPersistentStorage(c *Config)
After creating a new instance, the system will be load task data from persistent storage and added to scheduled storage mapping.
Types ¶
type Config ¶
type Config struct { DB string // The MongoDB uri DBName string // Database name from MongoDB Timezone string Timeout time.Duration // contains filtered or unexported fields }
Config to set the configuration task scheduler
type Jobs ¶
type Jobs struct { JobName string FuncName string JobParams []interface{} Cron []string // Set run a jobs with periodic by second, minute and hour // contains filtered or unexported fields }
Jobs instance
func (*Jobs) CronFormat ¶
CronFormat to set a job with cron format
func (*Jobs) EveryFifteenMinutes ¶
EveryFifteenMinutes to run a job every 15 minutes
func (*Jobs) EveryFiveMinutes ¶
EveryFiveMinutes to run a jobs every 5 minutes
func (*Jobs) EveryMinute ¶
EveryMinute to run a job every minutes
func (*Jobs) EverySixHours ¶
EverySixHours to run a job every 6 hours
func (*Jobs) EveryTenMinutes ¶
EveryTenMinutes to run a job every 10 minutes
func (*Jobs) EveryThirtyMinutes ¶
EveryThirtyMinutes to run a job every 30 minutes
func (*Jobs) EveryThreeHours ¶
EveryThreeHours to run a job every 3 hours
func (*Jobs) EveryTwelveHours ¶
EveryTwelveHours to run a job every 12 hours
Click to show internal directories.
Click to hide internal directories.