What torrent client are you using?

I know transmission has an option to run a schell script on completion.
transmissioncli(1): bittorrent client - Linux man page

Or rtorrent as well....