cron problems
Hi all
running 9.10 x64 My scripts in cron.daily are not running correctly. I am not using Anacron but waking my computer every night to run cron jobs - does that mean I should remove the anacron references from the cron lines or can they be left as is? This is my current file (note, I've commented out the originals) Code:
# /etc/crontab: system-wide crontab if I type into terminal Code:
run-parts --report /etc/cron.daily I'm starting to lose track of this system as it seems to have inherited various oddities and corruptions over the last 2 years, due in great part I imagine to my haphazard knowledge of linux. This machine running my mythtv so it would be nice if I didn't have to reformat and start again but many of the scripts running are important and I need to figure this out. Any help will be much much appreciated Thanks |
This is actually a very simple and common mistake. Cron is designed to run scripts, not commands. If the script needs advanced arguments then those should be placed in a master script to be called from cron. So save the following as a script and call that one script with cron.
Code:
########################################################### |
Quote:
Though I do also have cron also running programs, in particular, podracer. The developer told me how to do it at his website. |
well I can do that for sure if you think it will help, but its probably worth mentioning that the line you noted is part of the default crontab installed with the system - shouldn't it work as is - out of the box?
I had commented those lines out anyway and was just trying to get it to work without the anacron part ex. cd / && run-parts --report /etc/cron.daily |
so, to recap.
Cron is running...sort of. It doesn't seem to run with the right privileges as evidenced in some of the items in cron.daily folder getting permission denied messages in their logs. Also, my cron.log only lists 1 line per each script loaded, rather than a more detailed account. I've obviously messed up something over the last 2 yrs or so. Any help much appreciated. |
All times are GMT -5. The time now is 12:24 PM. |