diff --git a/swh/scheduler/cli.py b/swh/scheduler/cli.py --- a/swh/scheduler/cli.py +++ b/swh/scheduler/cli.py @@ -205,9 +205,11 @@ @click.argument('options', nargs=-1) @click.option('--policy', '-p', default='recurring', type=click.Choice(['recurring', 'oneshot'])) +@click.option('--priority', '-P', default='low', + type=click.Choice(['low', 'normal', 'high'])) @click.option('--next-run', '-n', default=None) @click.pass_context -def schedule_task(ctx, type, options, policy, next_run): +def schedule_task(ctx, type, options, policy, priority, next_run): """Schedule one task from arguments. Use sample: @@ -229,6 +231,7 @@ kw = dict(x.split('=', 1) for x in options if '=' in x) task = {'type': type, 'policy': policy, + 'priority': priority, 'arguments': { 'args': args, 'kwargs': kw,