- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: script runs as standalone but does not work in...
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-11-2007 08:07 AM
05-11-2007 08:07 AM
script runs as standalone but does not work in cron
Your "cron" job on msb-12
(/export/home/it/ARCH )
produced the following output:
stty: : No such device or address
xargs: Could not exec command: No such file or directory
xargs: Could not exec command: No such file or directory
xargs: Could not exec command: No such file or directory
xargs: Could not exec command: No such file or directory
xargs: Could not exec command: No such file or directory
xargs: Could not exec command: No such file or directory
xargs: Could not exec command: No such file or directory
xargs: Could not exec command: No such file or directory
xargs: Could not exec command: No such file or directory
xargs: Could not exec command: No such file or directory
xargs: Could not exec command: No such file or directory
xargs: Could not exec command: No such file or directory
xargs: Could not exec command: No such file or directory
xargs: Could not exec command: No such file or directory
xargs: Could not exec command: No such file or directory
xargs: Could not exec command: No such file or directory
xargs: Could not exec command: No such file or directory
xargs: Could not exec command: No such file or directory
xargs: Could not exec command: No such file or directory
xargs: Could not exec command: No such file or directory
xargs: Could not exec command: No such file or directory
xargs: Could not exec command: No such file or directory
xargs: Could not exec command: No such file or directory
xargs: Could not exec command: No such file or directory
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2007 08:13 AM
05-11-2007 08:13 AM
Re: script runs as standalone but does not work in cron
rule number 1 for scripting:
use full pathnames!
How to get?
Whereis ...
>whereis xargs
xargs: /usr/bin/xargs
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2007 08:13 AM
05-11-2007 08:13 AM
Re: script runs as standalone but does not work in cron
Jeff Traigle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2007 08:20 AM
05-11-2007 08:20 AM
Re: script runs as standalone but does not work in cron
xargs /bin/rm -fr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2007 08:29 AM
05-11-2007 08:29 AM
Re: script runs as standalone but does not work in cron
if [[ -t 0 ]]
then
stty ...
tabs ...
tset ...
fi
or the equivalent so that .profile works as intended when stdin is not a tty device.
The better way is to create a file (e.g. /usr/local/bin/myenv.sh) and use it to set and export any needed variables and then both your .profile and your cron'ed script should source this file. It's also a good place to set and export additional PATH values so that full path names are not needed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2007 08:30 AM
05-11-2007 08:30 AM
Re: script runs as standalone but does not work in cron
# echo $PATH
/usr/sbin:/usr/ccs/bin
#! /bin/sh
export PATH=/usr/sbin:/usr/ccs/bin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2007 04:40 PM
05-11-2007 04:40 PM
Re: script runs as standalone but does not work in cron
$ find ... 2>&1 > /dev/null
If you want to send both to /dev/null:
$ ... > /dev/null 2>&1
You sent stderr to stdout and tossed stdout.