- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: crontab with csh and sh scripts
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
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
05-17-2005 09:49 PM
05-17-2005 09:49 PM
crontab with csh and sh scripts
I submit a job in crontab as user A and get a nice mail when the script has finished successfully or when it aborts. Submitting a job as user B, I do not get a mail. How come? I don't use any redirection in the script or the crontab entry (such as >/dev/null 2>&1).
Thanks
Erwin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2005 09:53 PM
05-17-2005 09:53 PM
Re: crontab with csh and sh scripts
Can user B actually receive emails?
# echo test | mail userA
# echo test | mail userB
Can you see evidence the job ran in the cron log /var/adm/cron/log
Can you see any evidence of an attempt to email in /var/adm/syslog/mail.log?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2005 09:55 PM
05-17-2005 09:55 PM
Re: crontab with csh and sh scripts
Probably some permissions issue and under user B script fails to run.
Alex.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2005 10:04 PM
05-17-2005 10:04 PM
Re: crontab with csh and sh scripts
echo "hai erwin from $USER @ $(hostname)" | mail userb
It is good thing to redirect jobs log into /dev/null or some log file.
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2005 11:06 PM
05-17-2005 11:06 PM
Re: crontab with csh and sh scripts
Can you post the mail command you are issuing (& the crontab entry)?
live free or die
harry d brown jr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2005 11:08 PM
05-17-2005 11:08 PM
Re: crontab with csh and sh scripts
Last but not least, this is the entry in the cron log:
> CMD:/pp11/sybase/dba/permissions/permsfile.sh
> sybpp 9029 c Wed May 18 09:35:00 METDST 2005
< sybpp 9029 c Wed May 18 09:35:01 METDST 2005 rc=127
The script is definitely being executed. Our Sysadmin assures that user B can receive mail.
Rgs,
Erwin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2005 11:13 PM
05-17-2005 11:13 PM
Re: crontab with csh and sh scripts
I just found the problem: user B is an alias to, say user C; user C receives the messages, but not user B.
Thanks for your help again, maybe I'll have more followup questions later on to cron that I'll post in a separate thread.
Rgs,
Erwin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2005 12:31 AM
05-18-2005 12:31 AM