@job.command()<EOL>@click.option('<STR_LIT>', '<STR_LIT:-c>', is_flag=True, default=False,<EOL>help="<STR_LIT>")<EOL>@click.option('<STR_LIT>', '<STR_LIT>', multiple=True, type=click.Path(exists=True),<EOL>help="<STR_LIT>")<EOL>@click.option('<STR_LIT>', is_flag=True, default=False,<EOL>help="<STR_LIT>")<EOL>@click.pass_context<EOL>@clean_outputs<EOL>def restart(ctx, copy, file, u):  
config = None<EOL>update_code = None<EOL>if file:<EOL><INDENT>config = rhea.read(file)<EOL><DEDENT>if u:<EOL><INDENT>ctx.invoke(upload, sync=False)<EOL>update_code = True<EOL><DEDENT>user, project_name, _job = get_job_or_local(ctx.obj.get('<STR_LIT>'), ctx.obj.get('<STR_LIT>'))<EOL>try:<EOL><INDENT>if copy:<EOL><INDENT>response = PolyaxonClient().job.copy(<EOL>user, project_name, _job, config=config, update_code=update_code)<EOL><DEDENT>else:<EOL><INDENT>response = PolyaxonClient().job.restart(<EOL>user, project_name, _job, config=config, update_code=update_code)<EOL><DEDENT><DEDENT>except (PolyaxonHTTPError, PolyaxonShouldExitError, PolyaxonClientException) as e:<EOL><INDENT>Printer.print_error('<STR_LIT>'.format(_job))<EOL>Printer.print_error('<STR_LIT>'.format(e))<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>get_job_details(response)<EOL>
Restart job.

    Uses [Caching](/references/polyaxon-cli/#caching)

    Examples:

    \b
    ```bash
    $ polyaxon job --job=1 restart
    ```