Unfortunately no one can be told what fun_plug is - you have to see it for yourself.
You are not logged in.
Hi.
I am trying to setup a cron job to run a script which will watch a folder for transmission 1.50 for new torrent files and auto add them.
I have tested the script by running it manually, and it works just fine.. however I cannot get the cron job to run to save my life..
I haven't used cron all that much, but by looking at information available on the web, I believe that I have it setup right..
How do I know if I am using the correct instance of crontab? How can I verify that the crontab process is working nominally? I don't see the process listed when I run top or run ps ax..
Here is the current entry in my cron file..
* * * * * sh /ffp/start/torrentwatch.sh
Is that the correct syntax? or is it only supposed to be one space instead of a tab between the asterisks?
I have been searching this and other forums all day, and I haven't found anything that can point me in the right direction, so I am hoping that someone here can.
Thanks!
Offline
I have the line added as:
*/30 * * * * /ffp/var/scripts/torrentwatchdog.sh >> /mnt/USB/torrents/.torrentwd.log 2>&1
It runs every 30 minutes. sh is not needed. output goes to a log file. The exacutable bit on the script should be on (chmod a+x <filename>). /ffp/start is not the ideal place to put the file. The script will also run at startup.
Last edited by RunaR (2009-02-22 10:12:55)
Offline
mordack wrote:
Hi.
Here is the current entry in my cron file..
* * * * * sh /ffp/start/torrentwatch.sh
Is that the correct syntax? or is it only supposed to be one space instead of a tab between the asterisks?
You need to specify a bit more than that unless you want to run the script every minute. Have a look at the Wiki for example -> http://en.wikipedia.org/wiki/Cron#Fields
As RunaR already stated "*/30 * * * * /ffp/start/torrentwatch.sh" will be ok to run the script every 30 minutes on your machine. One space between the asterisks is sufficient but tabs should work as well.
Use "crontab -l" to check if the job was successfully added to the crons task list.
It would also be a good idea to specify a log file so you can see when the script was run and what it did.
Last edited by silversurfer (2009-02-27 18:28:55)
Offline
If all you want is to automate transmission, take a look of http://dns323.kood.org/forum/t2664-Tran … ript..html
Offline
RunaR wrote:
I have the line added as:
*/30 * * * * /ffp/var/scripts/torrentwatchdog.sh >> /mnt/USB/torrents/.torrentwd.log 2>&1
It runs every 30 minutes. sh is not needed. output goes to a log file. The exacutable bit on the script should be on (chmod a+x <filename>). /ffp/start is not the ideal place to put the file. The script will also run at startup.
the other thing i was wondering, was which crontab is being run? the one included with the ffp script? or the one that is included on the dns box itself? I looked and saw 2 folders with that command, pointing to two different busybox executables.. how do I verify which one is running the job? and does it make a difference?
does the */30 at the beginning of the crontab line make it every 30 mins? therefore if i make it */5 it will run every 5 mins?
I have used linux quite a bit, but never have had to run jobs using cron, so i kinda on a beginner level in that regard..
thanks!
Offline
I can't answer your first question, but it seems to work nonetheless.
*/30 means the job will run every 30 minutes. */5 will indeed make it run every 5 minutes. When you put just a "5" in that position it will only run on 5 minutes past the whole hour.
Offline
Thanks for your help, that seems to have done the trick!
Offline