On Thu, 27 Jul 2006, Cabell, Dale wrote:
How do I get cron to look at my cron scripts in cron.daily or hourly for that matter? I can execute the script manually (e.g. ./). I did a chmod 755 on the file. Do I need to do a 777?
The difference between 777 and 755 is that 777 would add the "2" bit (write access) for group members and others. Since you're not trying to write to the script, that won't help. Incidentally, I advise using the symbolic chmod notation until you know the octal stuff off the top of your head. To me, it's much easier to remember that chmod u=rwx,go=rx foo makes foo readable, writable, and executable by the "u"ser, and only readable and executable by "g"roup and "o"ther than it is to remember that "755" means the same thing. "755" does, however, have the advantage that it's quicker to type. Anyway, a mildly strange thing about Linux is that it turns out that the scripts in /etc/cron.daily aren't run by cron at all. Instead, they're run by a command called "run-parts". All this command does is look in a directory, then run every script it finds there. This turns out to be handy for scheduling stuff with cron because your nightly maintenance crud can have just one cron entry, and then the jobs proceed in an orderly fashion, one after another. So, to get cron to run everything in /etc/cron.daily, you need to add something like this to the crontab (using "crontab -e" to make changes to root's crontab): 5 3 * * * run-parts /etc/cron.daily Hope that helps. - Logan