diff --git a/swh/scheduler/cli.py b/swh/scheduler/cli.py --- a/swh/scheduler/cli.py +++ b/swh/scheduler/cli.py @@ -596,7 +596,8 @@ ''' else: tmpl = '{type}:\n {description}' - for tasktype in ctx.obj['scheduler'].get_task_types(): + for tasktype in sorted(ctx.obj['scheduler'].get_task_types(), + key=lambda x: x['type']): if task_type and tasktype['type'] not in task_type: continue if task_name and tasktype['backend_name'] not in task_name: