LinHES Forums http://forum.linhes.org/ |
|
cron problem - with "/myth/pretty script" - FIXED http://forum.linhes.org/viewtopic.php?f=6&t=10917 |
Page 1 of 1 |
Author: | neutron68 [ Sat Jul 22, 2006 10:09 am ] |
Post subject: | cron problem - with "/myth/pretty script" - FIXED |
In the last week, I've noticed that my recordings aren't getting written into the /myth/pretty directory. For example, I recorded the Tonight Show on Thursday night and it did not get written to the /myth/pretty directory. How can I find out what is going wrong and how can I fix this? Are there logs I can look in to see if the appropriate scripts are being run? Is there a script that automatically runs that creates the "PRETTY" files? Eric |
Author: | Xsecrets [ Sat Jul 22, 2006 10:10 am ] |
Post subject: | |
yes there is a script it's called mythlink and it's run from a cron job. |
Author: | neutron68 [ Sat Jul 22, 2006 10:36 am ] |
Post subject: | help with diagnose? |
I just manually ran the /usr/local/bin/mythlink.sh script from a command line and it added the latest recordings to /myth/pretty. It looks like this cron job is scheduled to run hourly! I see there's a file called "/etc/cron.hourly/pretty" It contains the following code: Code: #!/bin/sh su mythtv -c /usr/local/bin/mythlink.sh The mythlink.sh script contains the following code: Code: #!/bin/bash perl /usr/local/bin/mythrename.pl --link /myth/pretty At the end of this chain of files, it looks like the mythrename.pl script is doing the "pretty work". ** Keep in mind, that I believe that these are the files as loaded from the R5C7 cd. Please check them with the versions on your R5C7 systems for a match.** Here is my /etc/crontab file: Note: - the /etc/cron.hourly scripts are set to run at 17 minutes past each hour the mythrename.pl script is set to run at 5 minutes past the hour and 35 minutes past the hour - there are spaces rather than a tab between the words 'root' and 'run-parts' (my read on the crontab file is that it should have tabs between the data items rather than spaces) - the word 'pretty' is not complete on the same line of the file (it is broken by a carriage return) - there are also spaces rather than tabs in the first half of the last cron job listed (the line that calls mythrename) Code: # /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab' # command to install the new version when you edit this file. # This file also has a username field, that none of the other crontabs do. SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # m h dom mon dow user command 17 * * * * root run-parts --report /etc/cron.hourly 25 6 * * * root test -x /usr/sbin/anacron || run-parts --report /etc/cron.daily 47 6 * * 7 root test -x /usr/sbin/anacron || run-parts --report /etc/cron.weekly 52 6 1 * * root test -x /usr/sbin/anacron || run-parts --report /etc/cron.monthly # # run "pretty" script at 5 and 35 after every hour 5,35 * * * * root nice -n 19 /usr/local/bin/mythrename.pl --link /myth/pre tty The big question: if this worked several weeks ago, why doesn't this cron job run any more? How can I fix it? Can I simply restore files from a tar file somewhere? Eric |
Author: | Xsecrets [ Tue Jul 25, 2006 9:54 pm ] |
Post subject: | |
tabs or spaces should be fine as long as it's "white space" (actually probably black in this case, but you get the drift) I would edit that file and make sure that pretty is not separated by the carrage return and then reboot. (I know this is probably not the best way to make cron see the changes, but it works) |
Author: | neutron68 [ Wed Jul 26, 2006 8:52 pm ] |
Post subject: | tried suggestion - problem was something else |
I tried your suggestion. Here is what my /etc/crontab file looks like now. Does it look like yours? Code: # /etc/crontab: system-wide crontab # Unlike any other crontab you don't have to run the `crontab' # command to install the new version when you edit this file. # This file also has a username field, that none of the other crontabs do. SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # m h dom mon dow user command 17 * * * * root run-parts --report /etc/cron.hourly 25 6 * * * root test -x /usr/sbin/anacron || run-parts --report /etc/cron.daily 47 6 * * 7 root test -x /usr/sbin/anacron || run-parts --report /etc/cron.weekly 52 6 1 * * root test -x /usr/sbin/anacron || run-parts --report /etc/cron.monthly # # run tvpretty script at 5 and 35 after every hour 5,35 * * * * root nice -n 19 /usr/local/bin/mythrename.pl --link /myth/pretty After multiple reboots, still no new programs showing up in /myth/pretty... I looked in my /var/log/syslog and it looks like the mythrename.pl script is being called, but there is no evidence of if it succeeding. Next, I got an idea to look at the access modes for the files that are getting called. This looks like the problem. The file access modes had been altered from the "-rwxr-xr-x 1 root root...." that they were before. I just used: Code: chmod 755 /usr/local/bin/mythlink.sh
chmod 755 /usr/local/bin/mythrename.pl to restore the access modes of these files and I think all is fixed. Whew!! Eric |
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |