- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Cron Question
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
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
11-13-2006 08:31 AM
11-13-2006 08:31 AM
Cron Question
I have this defined in my cron entry :
10 * * * * /usr/bin/date >> /export/home/tg123/perf_stat && /usr/ucb/ps -auxww |grep java |grep tg123 |grep default |awk '{print $3" "$4}' >> /export/home/tg123/perf_stat
It runs fine at command line but its not updating the perf_stat file through the cron entry.
Any clues ?
thanks,
hunki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2006 08:34 AM
11-13-2006 08:34 AM
Re: Cron Question
Make the full command as a script and give the script name in crontab
it may work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2006 08:39 AM
11-13-2006 08:39 AM
Re: Cron Question
use set -x at top your script and then trouble shoot
-USA..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2006 09:31 AM
11-13-2006 09:31 AM
Re: Cron Question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2006 09:48 AM
11-13-2006 09:48 AM
Re: Cron Question
Yang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2006 09:57 AM
11-13-2006 09:57 AM
Re: Cron Question
You can put this single line as two commands in script i think..
try in this way
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2006 10:12 AM
11-13-2006 10:12 AM
Re: Cron Question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2006 10:36 AM
11-13-2006 10:36 AM
Re: Cron Question
Yang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2006 04:56 PM
11-13-2006 04:56 PM
Re: Cron Question
You can also use: awk '{print $3, $4}'
> I did try the two part way, but it ceases to work.
You did it with separate lines in a script? If that fails, you need to fix that first. And as Yang says, use -x.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2006 05:27 PM
11-13-2006 05:27 PM
Re: Cron Question
try to do a:
touch /export/home/tg123/perf_stat
(as the crontab owner)
and try again
hope this helps!
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2006 08:44 PM
11-13-2006 08:44 PM
Re: Cron Question
Does the user running the crontab the right to write into this file?