PluginScheduler - Novik/ruTorrent GitHub Wiki
Plugin Scheduler
Description
You can enable the scheduler and click the cells to define any of six rtorrent behavior types at each particular hour of 168 week hours.
- Unlimited - use predefined UL/DL limits. Default - a VeryBigNumber.
- Turn off - stop all torrents.
- Seeding only - stop all torrents, then start all torrents stopped by the plugin using predefined UL speed limit (Default - a VeryBigNumber).
- Limited1, Limited2, Limited3 - use speed limits defined in fields below. "0"-value, conventionally for rtorrent, means "no limits", but not "stop torrent".
How does it work
When ruTorrent starts with installed Scheduler plugin first time it sends a command to the rtorrent scheduler, which begins to call a dedicated script periodically. This script in its turn does all the work. Once again - the poll begins only after first start of the ruTorrent. I.e. there will be no any useful action between start of rtorrent and then first start of ruTorrent. To avoid this, a special string should be added to the rtorrent configuration file (see How to start plugins with rtorrent for details).
Additional plugin adjustment
Should be done in the file plugins/scheduler/conf.php
.
SCH_DEF_DL
- the constant defines DL speed limit which is used in the Unlimited mode. Default - a VeryBigNumber.SCH_DEF_UL
- the constant defines UL speed limit which is used in the Unlimited mode. Default - a VeryBigNumber.$updateInterval
- the variable sets the time interval between calls of the script by rtorrent scheduler (in minutes). Default - 1 hour.
PHP configuration
PHP uses UTC timezone by default, so you should check PHP configuration before using this plugin. Open the php.ini
file in a text editor and search for the line that contains date.timezone
. It might be commented out (preceded by a semicolon) or not present at all. Modify the php.ini
file so that date.timezone
line is uncommented and contain your desired timezone. Use a valid timezone string from the PHP Timezone List. Example for New York:
date.timezone = "America/New_York"
Important thing: rtorrent runs plugins via php cli, but your web server uses php-fpm or php apache-mod. They have different php.ini
configuration files. You should check both of them. These files are usually placed in /etc/php
directory. For example: /etc/php/8.2/cli/php.ini
and /etc/php/8.2/fpm/php.ini