Running a script on rtorrent completion

Solution 1:

Found the answer:

system.method.set_key = event.download.finished,some_name_for_this_command,"execute=/path/to/script.sh,$d.get_name="