API for scheduling, descheduling, and starting cron jobs has been created. New response helper added for ScheduleStatusResult.
This commit is contained in:
parent
ca8b9359cf
commit
15c2472ffd
5 changed files with 90 additions and 4 deletions
12
job.go
12
job.go
|
@ -25,6 +25,8 @@ type Job interface {
|
|||
Role(role string) Job
|
||||
Name(name string) Job
|
||||
CPU(cpus float64) Job
|
||||
CronSchedule(cron string) Job
|
||||
CronCollisionPolicy(policy aurora.CronCollisionPolicy) Job
|
||||
Disk(disk int64) Job
|
||||
RAM(ram int64) Job
|
||||
ExecutorName(name string) Job
|
||||
|
@ -156,6 +158,16 @@ func (j AuroraJob) InstanceCount(instCount int32) Job {
|
|||
return j
|
||||
}
|
||||
|
||||
func (j AuroraJob) CronSchedule(cron string) Job {
|
||||
j.jobConfig.CronSchedule = &cron
|
||||
return j
|
||||
}
|
||||
|
||||
func (j AuroraJob) CronCollisionPolicy(policy aurora.CronCollisionPolicy) Job {
|
||||
j.jobConfig.CronCollisionPolicy = policy
|
||||
return j
|
||||
}
|
||||
|
||||
// How many instances of the job to run
|
||||
func (j AuroraJob) GetInstanceCount() int32 {
|
||||
return j.jobConfig.InstanceCount
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue