In an Apache Mesos cluster, both Marathon (for long-running tasks) and
Chronos (for scheduled tasks) can be used to schedule jobs.
Why we need two different schedulers- one for for long running tasks and another one for scheduled tasks?
I think I found the answer I was looking for :
Marathon is used for long running(hence the name 'Marathon') tasks:
'long running tasks'
starts but never ends.
Mesos will ensure that applications it has launched will continue running, even if the slave node(s) they are running on fails.
Example for a long running service:a web server
Chronos is used for scheduled tasks:
eg:ETL jobs
Scheduled tasks
has defined start time and end time.
I may not want a failing scheduled tasks to restart again and again.
In chronos we can add dependent jobs to start upon completion of previous jobs,
building arbitrary DAGs(Directed Acyclic Graph) of jobs,which is the case with most ETL jobs.
References:
https://aster.is/blog/2015/10/07/whats-a-long-running-task/
How to run a one-off task with Apache Mesos/Marathon?
https://groups.google.com/forum/#!topic/marathon-framework/DPQfTN_3ssY
Mesos Framework