Unfortunately no one can be told what fun_plug is - you have to see it for yourself.
You are not logged in.
Hi,
I want to be able to schedule my downloads so they only occur during the night and I thought a good idea would be to start and stop the transmission daemon via cron.
But like most scripting ventures, it is not working (((
I have edited editcron.sh in ffp/start - it looks like
#!/bin/sh
CRONTXT=/mnt/HD_a2/crontab.txt
# start with existing crontab
/bin/crontab -l > $CRONTXT
# start transmission daemon at 21:00
/bin/echo "00 21 * * * /mnt/HD_a2/ffp/start/transmission.sh start > /mnt/HD_a2/.transmission/cron.log" >> $CRONTXT
#install the new crontab
/bin/crontab $CRONTXT
#clean up
/bin/rm $CRONTXT
The cron job kicks of at the right time but the daemon does not get started. The cron.log file contains the following indicating that the daemon never get started??
Starting transmission-daemon
Could not find Transmission socket
Not being an expert in linux scripting I am assuming it is failing somewhere in transmission.sh. Would anyone have an idea as to why it might be happening?
Thanks in advance for anyones help.
Cheers
Robert
Offline
you cold try getting the cron job to run a single script rather than sending "start" to transmission.sh in the cron job as follows:-
in editcron.sh:-
#start transmission daemon at 21:00
/bin/echo "00 21 * * * /mnt/HD_a2/ffp/bin/trans-start.sh" >> $CRONTXT
then in trans-start.sh :-
#!/bin/sh
/mnt/HD_a2/ffp/start/transmission.sh start > /mnt/HD_a2/.transmission/cron.log
For Testing, make sure of usual permissions issues, and try running the trans-start.sh to make sure it runs before incorporating it into the cron script.
Cheers.
Offline
doing this works for me but it does not reload the blocklist file unless i log in and do a restart via
/ffp/start/transmission.sh restart while in root
when cron does it everything works after reviewing the log file i generated but there is no reloading of the level1 list.
Any ideas?
Thanks.
Last edited by rocketfu (2008-09-17 20:46:24)
Offline
I figured this out. I executed an "env" while logged in as root and did another one in the cronjob. The Path and shell settings were different. I changed the cronjob to change the path and shell settings to the ones in root then everything worked.
Last edited by rocketfu (2008-09-17 22:13:25)
Offline
rocketfu wrote:
I figured this out. I executed an "env" while logged in as root and did another one in the cronjob. The Path and shell settings were different. I changed the cronjob to change the path and shell settings to the ones in root then everything worked.
Hi rocketfu,
Could you tell us what changes you did? I'm in the same boat as you -- wanting to have it start/stop on certain times of the day. I can see that the log is starting it but when I check the ps aux, it's not there. It works fine if ran from the commandline manually.
It seems like cron kills the job when it finishes so I tried adding a `&` at the end of the line so it continues to run in the background but that didn't seem to hep either.
Thanks!
Last edited by ZeroFill (2009-01-02 12:51:44)
Offline