Пример #1
0
func StartJobChain(client *jobscheduler.Client, job_chain, at string) {
	params := &jobscheduler.AddOrderInput{JobChain: job_chain, At: at, Id: "js_api"}
	_, err := client.StartJobChain(params)
	if err != nil {
		fmt.Printf("[ERROR] Cannot start job_chain: %s \n", err.Text)
		return
	}
	fmt.Printf("[OK] Success starting job_chain: %s \n", job_chain)
}
Пример #2
0
func StartJob(client *jobscheduler.Client, job, at string) {
	params := &jobscheduler.StartJobInput{Job: job, At: at}
	_, err := client.StartJob(params)
	if err != nil {
		fmt.Printf("[ERROR] Cannot start job: %s \n", err.Text)
		return
	}
	fmt.Printf("[OK] Success starting job: %s \n", job)
}