You are not logged in.
I want to schedule a job at 2 A.M. (since downloads from 2 A.M. to 8 A.M. do not count towards the 2.5 GB monthly upload/download limit imposed by my ISP). I have issued the command:
$ crontab -e
and then typed:
00 02 * * * rtorrent sample.torrent
and saved and exited the vi editor with <ESC>:wq. However, the job fails to start at 2 A.M. Nothing happens.
1) I have the correct time set, and synchronized with openNTPd.
2) rtorrent works fine when invoked directly from the shell.
3) The crond daemon is included in the daemons list in /etc/rc.conf and it is not disabled (prefaced by an ! mark) there.
4) I am using the Linux framebuffer. No X-server is installed on the system.
What do you think is the problem?
Thanks in advance.
Last edited by atriya (2008-12-09 11:52:12)
Offline
Is crond running (look in top)? If it is running, you should find something about the job in the logs, and crond should also send you a mail if an error is encountered (provided that a local MTA is running).
Those zeros are note required, but this should not be the issue:
0 2 * * * rtorrent sample.torrent
I am also not sure if you want to schedule this for each night or only one time. In the second scenario the tool you need is atd.
Mortuus in anima, curam gero cutis
Offline
crond is running. I want to schedule this for every night, or at least every night I leave the machine turned on, changing the name of the torrent as required. crontab is made for this sort of scheduling. The '* * *' signifies every night of the year.
Offline
Nobody knows what to do?
Offline
I tried redirecting the output with:
00 02 * * * rtorrent sample.torrent > OUT 2>&1
The contents of the OUT file after the scheduled time elapsed was:
rtorrent: PollEPoll::insert_read(...) epoll_ctl call failed
Anybody know what this means?
Last edited by atriya (2008-12-12 15:17:01)
Offline
I don't know what that error means. Perhaps rtorrent is expecting some kind of keyboard input?
What about leaving rtorrent always running, but with no torrents, and having a cron job at 2 o'clock (via cron like you have there) move torrents into a watched directory. This way you could also have the cron job stop the torrents as soon as the ISP starts counting traffic again.
This page mentions watching starting new when files are added and also stopping when they are removed.
http://kmandla.wordpress.com/2007/05/02 … ike-a-pro/
Offline
I'm not sure about your crontab issue, but rtorrent itself does have some rudimentary scheduling of download rates.
Bob
Offline
I just tried:
rtorrent foo.torrent < /dev/null (No standard input) and it failed with the epoll error. I think rtorrent doesn't want to run in the background (like via cron).
Offline
I just tried:
rtorrent foo.torrent < /dev/null (No standard input) and it failed with the epoll error. I think rtorrent doesn't want to run in the background (like via cron).
I think so too.
I would recommend running a script that wakes up every hour and run the rtorrent, all in a detached screen session.
Offline
I would recommend looking at transmisson, specifically transmissond which you could start and stop with cron for the hours you need.
Offline
Ok, I've solved the problem. Before I go to bed, I start up bittorrent and keep it running, but stop the network daemon. And I've put this in the ROOT crontab file:
0 2 * * * /etc/rc.d/network start
So the network starts up at 2 A.M. and it starts downloading. It's working now. Thanks, everybody.
Offline
aria2 has torrent support, maybe that would work for you
edit:
other solution:
let rtorrent poll a specific directory and let cron move the .torrent file there
Last edited by robmaloy (2008-12-17 18:30:26)
☃ Snowman ☃
Offline
I'd put a second vote up for rtorrent watched folders. Set it to look in ~/nightlytorrents as a watched folder or something, and then move torrents from ~/torrents at 0200 and back at 0800, that way you don't need to do anything yourself, as kmandla said.
It's the most elegant solution.
Offline