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?
2 Answers
I think this is well documented:
To generalize: Marathon is for long-running tasks (i.e. services), whereas Chronos is for scheduled tasks (i.e., cron
-like jobs).

- 31,405
- 8
- 58
- 90
-
1I knew Marathon is used for long running tasks.I should have asked "Why Marathon is used for services and chronos for scheduled tasks(and difference between Services vs Scheduled tasks)".Since this question doesn't have good quality, will delete it soon. – penguin Jan 22 '16 at 10:06
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