vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hello, Something amiss here as I receive no mail from cron (using mailx). Haven't been able to figure it out. Your help would be greatly appreciated. Below is crontab - is MAILTO= right for user name only or is there a path needed to /var/spool/mail/cmo or ~/ ? Anything else I ought to change? # for vixie cron # #$Header: /var/cvsroot/gentoo-x86/sys-apps/vixie-cron/files/crontab-3.0.1-r4,v$ # # # Global variables SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=cmo HOME=/ # check scripts in cron.hourly, cron.daily, cron.weekly and cron.monthly 0 * * * * root rm -f /var/spool/cron/lastrun/cron.hourly 1 3 * * * root rm -f /var/spool/cron/lastrun/cron.daily 15 4 * * 6 root rm -f /var/spool/cron/lastrun/cron.weekly 30 5 1 * * root rm -f /var/spool/cron/lastrun/cron.monthly */10 * * * * root test -x /usr/sbin/run-crons && /usr/sbin/run-crons -- oNb Another happy Linux user - # 276084. Reject religion ! Embrace Jesus Christ. |
| |||
| oldNbald wrote: > Hello, Something amiss here as I receive no mail from cron (using > mailx). Haven't been able to figure it out. Your help would be greatly > appreciated. Cron doesn't send mail if no output is generated, right? So everything is going fine, apparently. Or have you actually tried putting an output generating script in, and still got no mail? -- PeKaJe It's psychosomatic. You need a lobotomy. I'll get a saw. -- Calvin |
| |||
| Peter Jensen scratched on the wall: > Cron doesn't send mail if no output is generated, right?**So > everything is going fine, apparently.**Or*have*you*actually*tried > putting*an*output generating script in, and still got no mail? Hi Peter, Okay, didn't know that *only* errors were reported. No, I haven't put in a script to report... know how? Thought that something would show up in the logs which indicated the crons ran at X time. Also, seemed to me that this script would report something by default: #!/bin/bash /usr/bin/glsa-check -l /usr/bin/glsa-check -p all Am I wrong? -- oNb Another happy Linux user - # 276084. Reject religion ! Embrace Jesus Christ. |
| |||
| oldNbald enlightened us with: > Thought that something would show up in the logs which indicated the > crons ran at X time. It does. > Also, seemed to me that this script would report something by > default: Well, why not run it manually and find out? Sybren -- The problem with the world is stupidity. Not saying there should be a capital punishment for stupidity, but why don't we just take the safety labels off of everything and let the problem solve itself? |
| |||
| Sybren Stuvel scratched on the wall: >> Thought that something would show up in the logs which indicated the >> crons ran at X time. > > It does. > >> Also, seemed to me that this script would report something by >> default: > > Well, why not run it manually and find out? > Hello Sybren, Thanks for replying. Logs are empty outside of who logged on sort of stuff. I thought of running crons manually - and did - still nothing in a log. Here's one such output which logged nothing and sent no local mail: sh-2.05b# sh check-root.cron /usr/lib/.keep /usr/lib/locale/ru_RU/LC_MESSAGES/.keep /usr/lib/perl5/site_perl/5.8.4/i686-linux/auto/Image/Magick/.packlist /usr/lib/perl5/vendor_perl/5.8.2/i686-linux/auto/XML/Parser/.packlist /usr/lib/perl5/5.8.4/i686-linux/.packlist /usr/lib/mozilla/include/en igmime/.headerlist /usr/lib/mozilla/include/ipc/.headerlist /usr/lib/gkrellm2/plugins /.keep /usr/lib/nsbrowser/plugins/.keep /lib/.keep/lib/dev-state/.keep /lib/ udev-state/.keep eth0: PF_PACKET(/sbin/dhcpcd) sh-2.05b# mail No mail for cmo sh-2.05b# mail -u root No mail for root What do you think ? -- oNb Another happy Linux user - # 276084. Reject religion ! Embrace Jesus Christ. |
| |||
| So anyway, it was like, 15:26 CEST Oct 21 2004, you know? Oh, and, yeah, oldNbald was all like, "Dude, > Logs are empty outside of who logged on sort of stuff. I thought of > running crons manually - and did - still nothing in a log. I may be asking the obvious, but.. is cron running at all? -- Time flies like an arrow, fruit flies like a banana. Perth ---> * 15:31:48 up 44 days, 1:00, 12 users, load average: 0.00, 0.00, 0.00 Linux 2.6.8 x86_64 GNU/Linux Registered Linux user #261729 |
| |||
| oldNbald enlightened us with: > Logs are empty outside of who logged on sort of stuff. Then there is a big chance cron isn't running. > I thought of running crons manually - and did - still nothing in a > log. That's right. If you run a script manually, it won't get logged. Makes sense, since otherwise every single thing you'd type at a shell would be logged. > Here's one such output which logged nothing and sent no local mail The mail is sent by cron itself, not by the job. So running it manually shouldn't send an email. > sh-2.05b# sh check-root.cron > > /usr/lib/.keep /usr/lib/locale/ru_RU/LC_MESSAGES/.keep > /usr/lib/perl5/site_perl/5.8.4/i686-linux/auto/Image/Magick/.packlist > /usr/lib/perl5/vendor_perl/5.8.2/i686-linux/auto/XML/Parser/.packlist > /usr/lib/perl5/5.8.4/i686-linux/.packlist /usr/lib/mozilla/include/en > igmime/.headerlist > /usr/lib/mozilla/include/ipc/.headerlist /usr/lib/gkrellm2/plugins > /.keep > /usr/lib/nsbrowser/plugins/.keep /lib/.keep/lib/dev-state/.keep /lib/ > udev-state/.keep > > eth0: PF_PACKET(/sbin/dhcpcd) Ok, it gives output. This output should be mailed to you when the job is run by cron. > What do you think ? Cron isn't running. Sybren -- The problem with the world is stupidity. Not saying there should be a capital punishment for stupidity, but why don't we just take the safety labels off of everything and let the problem solve itself? |
| |||
| Sybren Stuvel scratched on the wall: > That's right. If you run a script manually, it won't get logged. Makes > sense, since otherwise every single thing you'd type at a shell would > be logged. Okay, makes since. See my reply to Johan for more ... thanks. -- oNb Another happy Linux user - # 276084. Reject religion ! Embrace Jesus Christ. |
| |||
| Johan Lindquist scratched on the wall: > I may be asking the obvious, but.. is cron running at all? To you both, Johan & Sybren, rc-update shows vixie-cron as "default". And, as root, "ps -aux" shows cron running: root 7646 0.0 0.1 1556 656 ? Ss Oct20 0:00 /usr/sbin/cron What do you all make of that? Also, syslogd is running. Your time is appreciated. -- oNb Another happy Linux user - # 276084. Reject religion ! Embrace Jesus Christ. |
| ||||
| oldNbald enlightened us with: > To you both, Johan & Sybren, rc-update shows vixie-cron as "default". > And, as root, "ps -aux" shows cron running: Hmm... that's weird. Which files are you checking for log entries btw? Sybren -- The problem with the world is stupidity. Not saying there should be a capital punishment for stupidity, but why don't we just take the safety labels off of everything and let the problem solve itself? |