![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
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. |
|
||||
|
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 |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|