The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
running script in cron - with ssh commands - not working frustrated1 Shell Programming and Scripting 31 09-16-2008 11:14 AM
Running a script with cron altamaha Shell Programming and Scripting 3 06-05-2008 09:46 AM
error in running shell script in cron sari Shell Programming and Scripting 3 04-16-2008 05:09 AM
Running a script in cron question NycUnxer UNIX for Dummies Questions & Answers 3 01-02-2008 01:22 PM
Running a Cron Script only @ Startup Pls Help!! perk_bud Shell Programming and Scripting 3 07-17-2007 07:29 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-22-2002
ankurgupta ankurgupta is offline
Registered User
  
 

Join Date: Mar 2002
Posts: 3
Question Running script using cron

I am running a script by scheduling it using the cron. The line in the cron file is -

10 * * * * ksh -v /apps/gofis/svam/cos_automation/cos_automation.sh vpqa > /apps/gofis/svam/cos_automation/cron.log 2>&1

But after the job is executed, the cron.log contains some part from cos_automation.sh script.

Can some one help me.

Thanks!
AnkuR.
  #2 (permalink)  
Old 11-22-2002
RTM's Avatar
RTM RTM is offline Forum Advisor  
Hog Hunter
  
 

Join Date: Apr 2002
Location: On my motorcycle
Posts: 3,039
The -v option you have added to crontab entry may be doing that.
  #3 (permalink)  
Old 11-22-2002
Kevin Pryke Kevin Pryke is offline
Registered User
  
 

Join Date: Feb 2002
Location: Bradford, UK
Posts: 70
the -v option in ksh -v is sending a listing of your script to stderr (the 2> part of the command)

You have then redirected this to stdout (the > part) by putting 2>&1.

To stop this happening either take out the -v option or redirect stderr to /dev/null. It depends whether you want to keep other errors or not.

ie. do either

10 * * * * ksh /apps/gofis/svam/cos_automation/cos_automation.sh vpqa > /apps/gofis/svam/cos_automation/cron.log 2>&1

or

10 * * * * ksh -v /apps/gofis/svam/cos_automation/cos_automation.sh vpqa > /apps/gofis/svam/cos_automation/cron.log 2>/dev/null
  #4 (permalink)  
Old 11-22-2002
ankurgupta ankurgupta is offline
Registered User
  
 

Join Date: Mar 2002
Posts: 3
Wink

guys, Thanks....it works well w/o "v" option.
  #5 (permalink)  
Old 12-12-2002
stonny stonny is offline
Registered User
  
 

Join Date: Nov 2002
Location: Canada
Posts: 1
what mean vpqa before de >
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:23 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0