The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > SUN Solaris
.
google unix.com



SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
SFTP not exiting when run from cron msabhilash SUN Solaris 2 12-02-2007 07:48 PM
Works Manually - not in CRON dstinsman UNIX for Dummies Questions & Answers 5 03-06-2006 08:36 AM
Can run script Manually, but not through Cron? MadHatter Shell Programming and Scripting 4 10-19-2005 10:08 AM
Old cron entry still runs, but shouldnt xadamz23 UNIX for Advanced & Expert Users 3 10-11-2005 05:11 PM
What user runs cron? michieka UNIX for Dummies Questions & Answers 10 06-02-2002 10:32 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-30-2007
Heidi.Ebbs Heidi.Ebbs is offline
Registered User
  
 

Join Date: Jun 2007
Posts: 10
Question SFTP errorcode 1 when run on cron but runs manually

I am trying to run a sript on cron to SFTP data to a company. Private and public keys are set up.
When I run this manully it works fine, however it was failing when run on cron. I have narrowed down the problem - it fails at the code that says if the error code is 0 then continue
. . . I inserted code to echo the error code, which is 1.

Why does it work fine manually with error code of 0 but produce error code 1 when run on cron?
For now, the script works as I have commented out 2 lines of code that prevent the script continuing if the error code is not 0.

Please help.
  #2 (permalink)  
Old 07-31-2007
sysgate's Avatar
sysgate sysgate is offline Forum Advisor  
Unix based
  
 

Join Date: Nov 2006
Location: Bulgaria
Posts: 1,318
If the script is not much sensitive, can you please post it ? Also, here in the forum there have been many topics what to do when inside the cron the script doesn't work, whereas outside works, so you may do some search.
  #3 (permalink)  
Old 08-08-2007
peteroc peteroc is offline
Registered User
  
 

Join Date: Aug 2006
Posts: 14
Possbily user ID related. If you're running the job manually under 1 ID, and the crontab is assigned to a different ID, you won't be able to connect. The keys you have set up need to be related to the ID that cron runs under.
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 08:13 AM.


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