Scheduling Scripts via API doesn't work #18511
Unanswered
mburggraf
asked this question in
Help Wanted!
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm trying to schedule the execution of a custom script via REST-API-request, however the command doesn't work as expected, even though it did work in the past. (Unfortunately I don't remember which was the last version where it did work).
Basically I am calling the following curl command:
curl -s --insecure --header "Authorization: Token ababababababababababababababababababab" -H "Accept: application/json; indent=4" -H "Content-Type: application/json" --data '{"commit":true, "data": {"my_param":"2"}, "schedule_at": "2025-02-01T09:00:11", "interval":1440 }' -X POST "https://netbox.local/api/extras/scripts/2/"
However I get the following result:
{"error": "'Script' object has no attribute 'scheduling_enabled'", "exception": "AttributeError", "netbox_version": "4.2.2", "python_version": "3.10.12"}
Via GUI it's possible to schedule the script, so scheduling definately is enabled.
What is the correct API-call for Scheduling a Script?
Beta Was this translation helpful? Give feedback.
All reactions