How to schedule transmission plugin to start/stop at specific time

Status
Not open for further replies.

ilyak

Cadet
Joined
May 29, 2013
Messages
2
Hi,

I want to schedule transmission to start/stop at specific time. Tried to just stop/start plugin service with the cron, job executing this commands: /etc/rc.d/jail onestart/onestop or /etc/rc.d/jail start/stop, but it won't work correctly(I need to restart freenas to start transmission again). Even if it was working as expected it's not optimal solution - I want to start/stop transmission directly and not the whole jail. Is there a way to do it?

Thanks
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Hi,

I want to schedule transmission to start/stop at specific time. Tried to just stop/start plugin service with the cron, job executing this commands: /etc/rc.d/jail onestart/onestop or /etc/rc.d/jail start/stop, but it won't work correctly(I need to restart freenas to start transmission again). Even if it was working as expected it's not optimal solution - I want to start/stop transmission directly and not the whole jail. Is there a way to do it?

Thanks

In the jail you would run a command like
Code:
service transmission start/stop
You can just add that as a cronjob in your jail. Or you can try running it through 'jexec' and add that as a cronjob in the freenas webgui.
 

ilyak

Cadet
Joined
May 29, 2013
Messages
2
I added two simple script under jail in /usr/scripts to start/stop transmission and execute them from the freenas cronjobs using 'jexec'. It works fine, thanks a lot .
 

Osiris

Contributor
Joined
Aug 15, 2013
Messages
148
Let me apologise for thread necro'ing, but I had exactly the same question.
It seems transmission from time to time gets stuck in some kind of peer search, draining bandwith.
I wanted the process killed between certain hours.
It works using the above method, except for one small detail.
I'm getting a usage message of chown while stopping?
Any ideas? Freenas 9.3, latest transmission plugin.

No problem stopping
Code:
root@transmission_1:~ # service transmission stop
Stopping transmission.
Waiting for PIDS: 56103.


Starting however
Code:
root@transmission_1:~ # service transmission start
usage: chown [-fhvx] [-R [-H | -L | -P]] owner[:group] file ...
       chown [-fhvx] [-R [-H | -L | -P]] :group file ...
Starting transmission.


Code:
ps -A
57378 ??  IJ  0:06.83 /usr/pbi/transmission-amd64/bin/python2.7 /usr/pbi/transmission-amd64/control.py start 10.10.20.3 12360
58791 ??  SsJ  0:00.67 /usr/pbi/transmission-amd64/bin/transmission-daemon -g /usr/pbi/transmission-amd64/etc/transmission/home -x /var/run/transmission/daemon.pid
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Let me apologise for thread necro'ing, but I had exactly the same question.
It seems transmission from time to time gets stuck in some kind of peer search, draining bandwith.
I wanted the process killed between certain hours.
It works using the above method, except for one small detail.
I'm getting a usage message of chown while stopping?
Any ideas? Freenas 9.3, latest transmission plugin.

No problem stopping
Code:
root@transmission_1:~ # service transmission stop
Stopping transmission.
Waiting for PIDS: 56103.


Starting however
Code:
root@transmission_1:~ # service transmission start
usage: chown [-fhvx] [-R [-H | -L | -P]] owner[:group] file ...
       chown [-fhvx] [-R [-H | -L | -P]] :group file ...
Starting transmission.


Code:
ps -A
57378 ??  IJ  0:06.83 /usr/pbi/transmission-amd64/bin/python2.7 /usr/pbi/transmission-amd64/control.py start 10.10.20.3 12360
58791 ??  SsJ  0:00.67 /usr/pbi/transmission-amd64/bin/transmission-daemon -g /usr/pbi/transmission-amd64/etc/transmission/home -x /var/run/transmission/daemon.pid
You can ignore that error. it's because I'm setting the download_dir to "" in the init script so that this setting can be changed from the transmission webinterface/remote, instead of it being hard set. the init script just gets confused by the blank variable, but everything will work.
 
Status
Not open for further replies.
Top