SABnzbd can run a user-provided script to be executed when a job is completed.
You can do whatever you like with such a script.
The script will receive these parameters. Use %1 in Windows scripts and $1 in Unix scripts.
Please note that in Windows the parameters will be enclosed in double quotes ("my name").
In Posix systems (OSX, Linux, Unix) the parameters will not have quotes at all.
| 1 | The final directory of the job (full path) |
| 2 | The original name of the NZB file |
| 3 | Clean version of the job name (no path info and ".nzb" removed) |
| 4 | Newzbin report number (may be empty |
| 5 | Newzbin or user-defined category |
| 6 | Group that the NZB was posted in e.g. alt.binaries.x |
| 7 | Status of post processing. 0 = OK, 1=failed verification, 2=failed unpack, 3=1+2 (0.5.0 only!) |
All parameters are properly quoted so that they may contain embedded spaces.
The "return" code of the script should be 0 if all went well or non-zero if errors occurred.
The console output of the script is captured by SABnzbd and saved in a log file.
The file will be added to the (optional) notification email and can be examined in the History page.
A post-processing script will only run when the job has completed without errors.
If you want to run the script always, you need to disable the option "Post-Process Only Verified Jobs".
All scripts must be located in the script-directory, that can be specified in Config->Directories.
The scripts can be used in these contexts:
- Associated with a job entry on the Main page
- Changed for a job on the Queue page
- Associated with a user-defined category
- Associated with the empty-queue event on the Queue page