Cron is not working
Hi please have a look in the following scenario:
I gave an entry in /etc/crontab as follows: 35 11 * * * root find /tmp/* -mtime +1 -exec rm -f {} \; > /etc/test/cronlog.log after this, from someone suggestions i restarted crond available under /etc/init.d/crond restart even after this no result...then i checked /var/log/cron log file...there i could see the following: Oct 2 11:35:01 vsl001a004 crond[3223]: (*system*) BAD FILE MODE (/etc/crontab) no result from the above stuff..can someone tell me what could be the reason and solution for this. Thanks |
Hi and welcome to LQ
You can put your command in a script and use crontab to run the script instead. Mind that is always better to use absolute pathnames for commands and scripts in crontab, like "/usr/bin/find ...", /path/to/my/script.sh" Regards |
Are you editing the /etc/crontab file directly? what are the permissions set on that file? They should be set to 644. if not, i'd advise you change it.
Also, just in case you were editing the file directly, if you need to make an entry for cron, you should use the 'crontab -e' command. HTH. -RN. |
How are you editing your crontab?
Hi,
Instead of going in and editing the /etc/crontab file directly, have you tried editing your crontab by doing the following? Code:
crontab -e Good Luck, Donanap |
The error message is:
Quote:
Code:
-rw-r--r-- 1 root root 718 2008-11-23 07:40 /etc/crontab |
After changing permissions it works fine
Thanks a lot..After changing permissions it works fine...
Narendra |
Can someone suggest best practices on unix administration and please provide some links if you find.#
Thanks Narendra |
unix administration - best practices
Can someone suggest best practices on unix administration and please provide some links if you find.
Thanks Narendra |
Quote:
2. Type "google.com" in the address bar. 3. Type your inquiry. 4. Press the Enter key on your keyboard. Imagine the time saved compared to asking us, and us asking Google. |
All times are GMT -5. The time now is 10:00 AM. |