From 7c3318df923558574b6fe5c244122287e5a6bcf7 Mon Sep 17 00:00:00 2001 From: Daniel Sheppard Date: Tue, 2 Nov 2021 15:56:42 -0500 Subject: [PATCH] #6529 - Adjusted the arguments. Added documentation --- docs/customization/custom-scripts.md | 14 ++++++++++++++ netbox/extras/management/commands/runscript.py | 10 +++++----- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/docs/customization/custom-scripts.md b/docs/customization/custom-scripts.md index cf052f918..ef74ed7ee 100644 --- a/docs/customization/custom-scripts.md +++ b/docs/customization/custom-scripts.md @@ -259,6 +259,20 @@ http://netbox/api/extras/scripts/example.MyReport/ \ --data '{"data": {"foo": "somevalue", "bar": 123}, "commit": true}' ``` +### Via the CLI + +Scripts can be run on the CLI by invoking the management command: + +``` +python3 manage.py runscript [--commit] [--loglevel {debug,info,warning,error,critical}] --script .