Scheduler

Suggest, post, or discuss plugins for Deluge
Post Reply
mpatrick

Scheduler

Post by mpatrick »

Hi,

I am a Newbie to Linux (windows poweruser for many many years)

Just started using Deluge for torrents, which is great, after being used to Utorrent in windows.

However one thing I would like to get working is a scheduler to automatically stop any downloads at 6pm and restart at 11pm (peak times for my ISP)
So I found the following link and followed that
http://dev.deluge-torrent.org/wiki/UserGuide/Scheduling

I followed the article to the letter using Gnome Schedule 2.1.0, ie

Disable all downloads
deluge -u console -a "config --set max_active_limit 0"
Enable again
deluge -u console -a "config --set max_active_limit 100"

However from testing this nothing happened, the downloads continued and never stopped or started no matter which times I tested (tried it a few times)
I even tried it with the suppress output as in the article and default behaviour, but still nothing worked.

So does anyone have any ideas as to what I am doing wrong, or maybe another way of doing this? Shame they do not offer a plugin in Deluge to do this.

So at the moment I am using Ktorrent, which has a scheduler plugin that works and does the job I want. However I do not like the look of Ktorrent compared to Deluge and does not seem to offer as many seeds as Deluge for same torrent. Also a lot of people comment that Ktorrent sometimes freezes there machines although I have not experienced that.

I wonder if it is anything to do with the latest version of Deluge I am using 1.1.9 as the article states for Deluge 1.1 only?

I am using Ubuntu Karmic Koala 9.10

Any help would be most appreciated

Regards

Michael
loki
Moderator
Moderator
Posts: 787
Joined: Tue Dec 04, 2007 3:27 pm
Location: MI, USA

Re: Scheduler

Post by loki »

If you would consider using the current 1.2 release it comes with a scheduler plugin that does this very thing. I assume it does work... I don't use scheduler myself though.
ner0tic
Member
Member
Posts: 15
Joined: Fri Oct 23, 2009 8:39 pm

Re: Scheduler

Post by ner0tic »

I use teh scheduler plugin for 1.2.x and it works like a charm.
Kaanura

Re: Scheduler

Post by Kaanura »

Hi,

I'm trying to get the scheduler happening on my headless server but the deluge webgui isn't showing any scheduler options in the preferences window, and there are no plugins are showing up in the plugins section.

Running 1.2.0 rc5

Any thoughts?
H3g3m0n
New User
New User
Posts: 3
Joined: Sat Aug 29, 2009 9:17 am

Re: Scheduler

Post by H3g3m0n »

I had a look at the 1.2rc5 scheduler plugin. Unfortunately its mostly useless. It doesn't give much control, its either green, red or yellow (throttled).

I'm in Australia which will be one of the main places its used. Theres no options for choosing if you want seeding or not (although maybe the yellow setting with -1 would work), many ISPs don't count uploads as bandwidth but some do. The scheduler is in blocks of 1 hour. My ISP has 3:30-8:30 as off peak for many of its better plans (mine is 4-9 but I will be changing at some point).

I have been using cron with some manual scripts. I had to modify them for 1.2. It's a bit of a shotgun system. The scripts will fire every 5 min. This ensure that if the daemon isn't running when the change over occurs it will get hit again by another script in 5 min.

crontab -e

Code: Select all

# m h  dom mon dow   command
*/5 04-09 * * * /home/hegemon/bin/start-torrents >/dev/null 2>&1
*/5 09-23,01-03 * * * /home/hegemon/bin/stop-torrents >/dev/null 2>&1
My scripts look something like this:
~/bin/start-torrents

Code: Select all

#!/bin/sh
killall -9 deluge-console
killall -9 deluge-console
killall -9 deluge-console
killall -9 deluge-console
killall -9 deluge-console
killall -9 deluge-console
deluge-console "config --set max_active_limit 2" &
/home/hegemon/bin/deseed-torrents &
The kill statements are because deluge-console seems to lockup sometimes and I was flooding the system with them. For stop-torrents change the 2 to a 0. You probably won't to drop the deseed-torrents line too. Remember to change username.

The following is the deseed-torrents script. I have some really dodge problems with my connection making seeding effectively kill my download speed (and sometimes the connection starts to drop out) so I don't seed while downloading. Normally I just reactivate them manually in the morning but it might be possible to write something to reseed based on whatever priority.

Code: Select all

#!/bin/zsh
SEEDING=`deluge-console "info" | grep "State:\ Seeding" -B 1 | grep "ID" | cut -f2 -d\ `
echo $SEEDING | while read ID; do
	echo "Pausing: $ID";
	deluge-console  "pause $ID"
done
Post Reply