Ticket #2073 (new enhancement)

Opened 4 weeks ago

Last modified 3 weeks ago

feature request: set ratios dependent on time of day

Reported by: anonymous Owned by: rakshasa
Priority: low Milestone:
Component: rtorrent Version:
Severity: trivial Keywords:
Cc:

Description

I wonder if it was hard to implement a new configuration option to set e.g. the upload ratio dependent on time of day. E.g. "off" from 00:00 to 10:00 and "60KB" from 10:00 to 00:00.

Attachments

Change History

Changed 3 weeks ago by rot

This can be done externally via script in crontab.

Here is an example:

#!/usr/bin/perl
use RTPG
use warnings
use strict;
my $rt = RTPG->new(url => '/home/rtorrent/scgi');
my ($u,$d) = (1024*$ARGV[0],1024*$ARGV[1]);						     	$rt->rpc_command('set_upload_rate',$u);						$rt->rpc_command('set_download_rate',$d);

To set upload speed to 25kB/sec and download speed to 75kB/sec, you will run this as follows:

./setspeed.pl 25 75

Run the script in crontab at the time you want.

Note: Install RPC::XML and RTPG modules from your repository or CPAN.

Changed 3 weeks ago by anonymous

You don't need a script, rtorrent has a built-in schedule feature to run commands at a certain time-of-day.

Try

schedule=up_off,0:00:00,24:00:00,upload_rate=0
schedule=up_limit,10:00:00,24:00:00,upload_rate=60

Note that the second time argument is an interval, not the stop time. So to run something always at the same time-of-day it has to be 24:00:00. (Might break on daylight saving changes though.)

Add/Change #2073 (feature request: set ratios dependent on time of day)

Author


E-mail address and user name can be saved in the Preferences.


Action
as new
 
Note: See TracTickets for help on using tickets.