Periodically pause and resume Transmission torrents on FreeNAS

Unless you have great internet bandwidth you probably don't want to leech and seed your 100 torrents during the day. You usually want them to seed during the night and then pause in the morning. Let's do this on our FreeNAS box.

  1.  Open up your jails, select transmission and fire up the shell from the icon below.
  2. If you dislike vi as default editor, set it to ee by running the following command:
    setenv EDITOR /usr/bin/ee

    To make this choice persistent, open up .cshrc and add the command on the bottom.

  3. Run
    crontab -e

    and write the following lines:

    0 1 * * * /usr/local/bin/transmission-remote localhost:9091 --auth=YOUR_TRANSMISSION_USER:YOUR_TRANSMISSION_PASSWORD -tall --start
    0 7 * * * /usr/local/bin/transmission-remote localhost:9091 --auth=YOUR_TRANSMISSION_USER:YOUR_TRANSMISSION_PASSWORD -tall --stop

    Change the username and password with the ones you use to access Transmission WebUI. The example will start all torrents at 1AM and stop them at 7AM.


Update in 2023: in TrueNAS 13 (perhaps even earlier versions), transmission-remote is no longer preinstalled inside the jail, you need to install it first:

pkg install transmission-utils