Categories
Company
Local Language
Forums
Discussions
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2004 02:42 AM
10-27-2004 02:42 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2004 02:45 AM
10-27-2004 02:45 AM
Re: cronjob
Any variable your script needs like:
PATH
TERM
has to be set explicitly in the cron script.
Sometimes you can include a user source file in the script
. /home/username/.profile
That might help.
That is the most common cause of this issue.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2004 02:48 AM
10-27-2004 02:48 AM
Re: cronjob
# logrotate
#
0 0 * * * /opt/logrotate/bin/logrotate /etc/logrotate.conf >/tmp/logrotate.cron 2>&1
Any errors will be in /tmp/logrotate.cron
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2004 02:58 AM
10-27-2004 02:58 AM
Re: cronjob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2004 03:49 AM
10-27-2004 03:49 AM
Re: cronjob
set -x
near the top of the script on its own line...(after #!/bin/sh or what have you)
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2004 04:01 AM
10-27-2004 04:01 AM
Re: cronjob
You can check your mail queue with mailq -v -d to see if there are rejects or mail sitting in the queue going nowhere. You can force-flush the queue with sendmail -v -d8.20 -q
Also, if you are using aliases to send the e-mail, check the permissions on /etc/mail to see if other has read permissions.
mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2004 04:02 AM
10-27-2004 04:02 AM
Re: cronjob
mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2004 04:03 AM
10-27-2004 04:03 AM
Re: cronjob
if the cron log states that the job ran and actually ended without errors, the problem i s more likely in the mail system or in that direction.
However, try and check the mail of the user in question; it might give a clue.
regards,
John K.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2004 04:10 AM
10-27-2004 04:10 AM
Re: cronjob
elm -s "QC Aging - NLR" $MAIL_SEND_TO_NLR < qc_aging_nlr.txt
This works fine when manually ran, but not inside the cronjob.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2004 04:31 AM
10-27-2004 04:31 AM
Re: cronjob
mailx -s "QC Aging - NLR" $MAIL_SEND_TO_NLR < qc_aging_nlr.txt
But best to wait to see the /tmp/cronjob.log....
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2004 04:54 AM
10-27-2004 04:54 AM
Re: cronjob
You dont have to wait till next Monday to look at the output from the script :-).
By default, cron sends stdout and stderr to the user's UNIX mailbox, if there is no output redirection.
Refer the /var/mail/
- Sundar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2004 05:16 AM
10-27-2004 05:16 AM
Re: cronjob
0 22 * * 4 /usr/local/bin/fsadm.defrag >/dev/null 2>&1
In which case the errors are gone...
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2004 05:27 AM
10-27-2004 05:27 AM
Re: cronjob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2004 05:31 AM
10-27-2004 05:31 AM
Re: cronjob
Received: (from root@localhost) by maydist2.maybelline.com (8.8.6 (PHNE_17190)/8
.7.1) id VAA03707 for ohio; Tue, 26 Oct 2004 21:00:03 -0500 (CDT)
Date: Tue, 26 Oct 2004 21:00:03 -0500 (CDT)
From: root
Message-Id: <200410270200.VAA03707@maydist2.maybelline.com>
Subject: cron
/ohio/bin/qc_aging.sh[20]: qc_aging_nlr.txt: Cannot find or open the file.
logout
This error that cron is mailing to the user, but the file does exist.
ls -lai qc_aging_nlr.txt
169 -rwxrwxrwx 1 ohio users 151 Oct 25 11:01 qc_aging_nlr.tx
t
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2004 05:35 AM
10-27-2004 05:35 AM
SolutionInstead of:
elm -s "QC Aging - NLR" $MAIL_SEND_TO_NLR < qc_aging_nlr.txt
try
elm -s "QC Aging - NLR" $MAIL_SEND_TO_NLR < /the/path/to/qc_aging_nlr.txt
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2004 05:40 AM
10-27-2004 05:40 AM
Re: cronjob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2004 05:49 AM
10-27-2004 05:49 AM
Re: cronjob
regarding the error in line 20:
/ohio/bin/qc_aging.sh[20]: qc_aging_nlr.txt: Cannot find or open the file.
does the script look for the file in the correct directory?
regards,
John K.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2004 05:54 AM
10-27-2004 05:54 AM
Re: cronjob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2004 05:55 AM
10-27-2004 05:55 AM