You are not logged in.

#1 2008-12-09 11:49:03

atriya
Member
From: Kolkata, India
Registered: 2008-09-09
Posts: 31

Job scheduling not working

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

#2 2008-12-09 11:55:47

patroclo7
Member
From: Bassano del Grappa, ITALY
Registered: 2006-01-11
Posts: 915

Re: Job scheduling not working

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

#3 2008-12-09 12:02:15

atriya
Member
From: Kolkata, India
Registered: 2008-09-09
Posts: 31

Re: Job scheduling not working

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

#4 2008-12-10 03:42:10

atriya
Member
From: Kolkata, India
Registered: 2008-09-09
Posts: 31

Re: Job scheduling not working

Nobody knows what to do?

Offline

#5 2008-12-12 15:16:37

atriya
Member
From: Kolkata, India
Registered: 2008-09-09
Posts: 31

Re: Job scheduling not working

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

#6 2008-12-13 00:40:47

gorn
Member
Registered: 2008-02-01
Posts: 56

Re: Job scheduling not working

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

#7 2008-12-13 02:21:21

Hrod beraht
Member
Registered: 2008-09-30
Posts: 186

Re: Job scheduling not working

I'm not sure about your crontab issue, but rtorrent itself does have some rudimentary scheduling of download rates.

Bob

Offline

#8 2008-12-13 02:59:58

gorn
Member
Registered: 2008-02-01
Posts: 56

Re: Job scheduling not working

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

#9 2008-12-13 15:58:56

jcolinzheng
Member
From: Cambridge, MA
Registered: 2008-08-06
Posts: 50
Website

Re: Job scheduling not working

gorn wrote:

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

#10 2008-12-13 19:02:50

tesjo
Member
Registered: 2007-11-30
Posts: 164

Re: Job scheduling not working

I would recommend looking at transmisson, specifically transmissond which you could start and stop with cron for the hours you need.

Offline

#11 2008-12-14 04:49:22

atriya
Member
From: Kolkata, India
Registered: 2008-09-09
Posts: 31

Re: Job scheduling not working

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

#12 2008-12-17 18:28:25

robmaloy
Member
From: Germany
Registered: 2008-05-14
Posts: 263

Re: Job scheduling not working

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

#13 2008-12-19 17:55:42

SiC
Member
From: Liverpool, England
Registered: 2008-01-10
Posts: 430

Re: Job scheduling not working

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

Board footer

Powered by FluxBB