Transmission Crontab
Forum » Forum / Torrent programs » Transmission Crontab
started by: FingAZFingAZ
on: 1210252138|%e %b %Y, %H:%M %Z|agohover
number of posts: 10
rss icon RSS: new posts
summary:
Setting up transmission to auto-start/stop
Transmission Crontab
FingAZFingAZ 1210252138|%e %b %Y, %H:%M %Z|agohover

Hi everyone,
I have recently managed to manually install the 2.00.18 firmware and restore my mybook back to a half decent state after learning about linux the messy way :)
Now have transmission and clutch installed fine, all works and can start using "/etc/init.d/transmission.sh start" - but trying to use /etc/crontabs/root to stop the process @ 4pm and restart @ 11pm to avoid the 'peak period' laid out by my ISP (aka to avoid bandwidth throttling!)

So far i am using;
0 16 * * * /etc/init.d/transmission.sh start

and similar but different timing for stop.
The command functions fine manually, but can't get it going using cron.

Any ideas? The only thing i could think of is maybe it requires the command to be in "'s due to the space between script location and action?

Thanks in advance,
Darren.

unfold Transmission Crontab by FingAZFingAZ, 1210252138|%e %b %Y, %H:%M %Z|agohover
Re: Transmission Crontab
FingAZFingAZ 1210252360|%e %b %Y, %H:%M %Z|agohover

Thinking about making two seperate scripts in init.d, so transmissionstart.sh and transmissionstop.sh to remove the need for spacing in the command?
Whats the verdict?

unfold Re: Transmission Crontab by FingAZFingAZ, 1210252360|%e %b %Y, %H:%M %Z|agohover
Re: Transmission Crontab
alephsmithalephsmith 1210253455|%e %b %Y, %H:%M %Z|agohover

Did you install it via optware? If so look in your crond.sh and check what your PATH is being set to. You will need to make sure that your transmission-daemon and transmission-remote are both in your PATH.

Also try running cron with logging enabled to see if the commands are actually being run.

I recently tried doing the same thing as you by setting the upload limit 0 during my peak peak times. That way I would upload in the mean time. Unfortunately setting transmissions download limit to 0 via the cli doesn't actually stop downloads buy sets it to unlimited download bandwidth. I reported it in clutch forms, and I will report it in the main transmission forum when I get a chance.

last edited on 1210253572|%e %b %Y, %H:%M %Z|agohover by alephsmith + show more
unfold Re: Transmission Crontab by alephsmithalephsmith, 1210253455|%e %b %Y, %H:%M %Z|agohover
Re: Transmission Crontab
FingAZFingAZ 1210255845|%e %b %Y, %H:%M %Z|agohover

I actually installed it the long way; Transmission version 1.01 and Clutch 0.2- soley to avoid the need to mess around with paths and the such lol;
Any further ideas :)

How do you setup cron logs?

unfold Re: Transmission Crontab by FingAZFingAZ, 1210255845|%e %b %Y, %H:%M %Z|agohover
Re: Transmission Crontab
alephsmithalephsmith 1210420344|%e %b %Y, %H:%M %Z|agohover
[root@MyBookWorld ~]# crond --help
BusyBox v1.2.2 (2008.01.18-09:29+0000) multi-call binary

Usage: crond -d[#] -c <crondir> -f -b

    -d    [#]    -l [#] -S -L logfile -f -b -c dir
    -d    num    debug level
    -l    num    log level (8 - default)
    -S            log to syslogd (default)
    -L    file    log to file
    -f            run in foreground
    -b            run in background (default)
    -c    dir    working dir

[root@MyBookWorld ~]#

ie. change your crond.sh script to include the -L logfile switch. Then restart crond

unfold Re: Transmission Crontab by alephsmithalephsmith, 1210420344|%e %b %Y, %H:%M %Z|agohover
Re: Transmission Crontab
FingAZFingAZ 1210596238|%e %b %Y, %H:%M %Z|agohover

Realised what the problem was! Bit of a PEBKAC error - the cron worked fine, but i had setup another cron to restart my book @ 4am, which occured, and then i hadn't setup transmission to load automatically on boot.
So i checked when transmission wasn't running.
Doh! :)

Thanks so much for your help!

unfold Re: Transmission Crontab by FingAZFingAZ, 1210596238|%e %b %Y, %H:%M %Z|agohover
Re: Transmission Crontab
FingAZFingAZ 1211132494|%e %b %Y, %H:%M %Z|agohover

How did you manage to adjust these settings? Would it therefore be possible to enter a decimal value? (ie. 0.01kb/s to make it negible)
What was the script that you were running?

FingAZ.

unfold Re: Transmission Crontab by FingAZFingAZ, 1211132494|%e %b %Y, %H:%M %Z|agohover
Re: Transmission Crontab
alephsmithalephsmith 1211148886|%e %b %Y, %H:%M %Z|agohover

Unfortunately no, decimals are not excepted. However setting it to 1KB/s is negligible enough for me.

You don't need to run a script, just run the actual command. My /etc/crontabs/root:

# standard crontab format for busybox cron daemon.
# fields may be lists
# min    hour day month wd  command
#  *      *    *   *     *   dosomething

# save the date every day at midnight
0   0    *   *     *   date +%m%d%H%M%Y.%S > /var/lib/now
05   3    *   *     *   transmission-remote -D   #sets download to unlimited
45  8    *   *     *   transmission-remote -d 1  #sets download to max 1 KB/s
unfold Re: Transmission Crontab by alephsmithalephsmith, 1211148886|%e %b %Y, %H:%M %Z|agohover
Re: Transmission Crontab
FingAZFingAZ 1211309748|%e %b %Y, %H:%M %Z|agohover

What about limiting upload also? -u?

unfold Re: Transmission Crontab by FingAZFingAZ, 1211309748|%e %b %Y, %H:%M %Z|agohover
Re: Transmission Crontab
kyyhkynenkyyhkynen 1211311902|%e %b %Y, %H:%M %Z|agohover

Yes, with -u. You can see a list of all the available command line options for transmission-remote with calling it without any arguments.

As another note, I have put together a shell script to add some extra functionality to transmission, like watch directory and automatic removal of completed torrents and, in your case probably the most interesting part, bandwidth scheduling.

The script and a guide on using it can be found here.

Of course, the crontab solution will work just as fine :)

unfold Re: Transmission Crontab by kyyhkynenkyyhkynen, 1211311902|%e %b %Y, %H:%M %Z|agohover
new post
Unless stated otherwise Content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License