1

I can start one job my-task-name on chronos manually via its rest api:

http PUT http://my-chronos/scheduler/job/my-task-name
HTTP/1.1 204 No Content
Connection: keep-alive
Content-Type: application/json
Date: Mon, 28 Nov 2016 09:40:55 GMT
Server: openresty/1.7.10.2

yet I have a list of jobs I want to execute manually and I don't want to fire a PUT request for each one of them. Is it possible to execute a batch of task via one request on chronos? Or do I have start each job with its own request?

Jacek Laskowski
  • 72,696
  • 27
  • 242
  • 420
k0pernikus
  • 60,309
  • 67
  • 216
  • 347

1 Answers1

1

There are a couple of ways to handle this depending on what you are trying to accomplish.

  1. you can schedule all the job via a CRON. In this way no PUT call is required at all, it is completely based on time.
  2. you can use dependent jobs assuming actually want to have control of the kick off (the PUT request) but want that to fire many jobs. The setup would consist of creating a "dummy job" (unless you have a real starting job). Imagine a dummy job of "sleep 1". Then have a number of dependent jobs. When the dummy job is complete the other dependent jobs will queue up.
Ken
  • 229
  • 2
  • 5
  • Task are already scheduled to run daily, yet sometimes the need arises to restart them manually, and the chronos frontend is a pain to use for that. I don't want a metatask that have all the relevant tasks as dependent as the list of tasks I want to execute might change. Both solutions won't work for me. – k0pernikus Nov 28 '16 at 22:33