Post-Processing Scripts
Weaver’s pipeline handles verification, repair, extraction, and the move itself. Scripts run after that, against the finished output, under the exact environment contract SABnzbd or NZBGet would give them. Existing scripts run unmodified.
Enable Execution
Section titled “Enable Execution”Execution is off by default, because an enabled script runs with Weaver’s privileges. Turn it on under Settings → Post-processing, which is marked beta. WEAVER_STRICT_SECURITY refuses script execution regardless of the switch.
The same page sets concurrency, the termination grace period after a timeout (10 seconds by default), interpreter paths for Python, PowerShell, and batch scripts, and the unacceptable extensions list that fails a job whose output matches a pattern such as *.exe.
Add Scripts
Section titled “Add Scripts”Drop a script, or a folder containing an NZBGet manifest.json, into scripts inside the data directory. In Docker that is /config/scripts. Weaver lists the folder live: adding, editing, or renaming takes effect immediately, and anything it cannot parse is listed as a problem rather than hidden.
The adapter is detected per script:
| Script carries | Contract |
|---|---|
| Nothing special | SABnzbd: SAB_* variables and the positional arguments, nonzero exit recorded as a warning |
NZBGet’s header comment or a manifest.json | NZBGet: NZBPP_*, NZBPO_*, and NZBOP_* variables, exit 93 success, 94 failure, 95 skipped |
Options declared by an NZBGet manifest become inputs on the script job. Values marked secret are kept encrypted, and can be shared between jobs as named secrets.
Script Jobs
Section titled “Script Jobs”A script does nothing until it is wired to a trigger as a script job: the post-processing trigger for scripts that run after a download, plus queue events, scans, schedules, and feeds. Each job carries its own inputs, categories, blocking flag, and time limit. Global jobs run first and category jobs run after them. Creating jobs, testing them, secrets, and the Runs table are covered in Scripts.
Results
Section titled “Results”Each script’s name, outcome, duration, and the tail of its output are recorded on the job and shown in Job Detail’s event log. Outcomes are succeeded, skipped, warned, failed, cancelled, and timed out. Re-run scripts in Job Detail repeats the list against the finished output.
Related
Section titled “Related”- Scripts covers script jobs, triggers, secrets, and runs.
- Pipeline And Storage defines scripts.
- Security And Access explains strict mode.
- Scryer users: Scryer has its own post-processing that runs after import, which is usually the better place for library-side scripts.