X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=3.4 required=5.0 tests=AWL,BAYES_00,BOTNET,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Message-id: <4E5E7841.7070303@cygwin.com> Date: Wed, 31 Aug 2011 14:06:57 -0400 From: "Larry Hall (Cygwin)" Reply-to: cygwin AT cygwin DOT com User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: cron References: <4E552D8A DOT 5060002 AT cygwin DOT com> In-reply-to: Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On 8/25/2011 6:27 AM, kishore wrote: > Larry Hall (Cygwin cygwin.com> writes: > >> >> On 8/24/2011 12:08 PM, mramakishore gmail.com wrote: >>> HI, >>> I am sucessed to run the Perl script which uses Net::SSH::Expect >>> package from the cygwin command prompt. but i am scheduled the same >>> script through crontab but script is breaking in middle. >> >> >> >>> can you help me as early as possible.. >> >> First, have you ensured that you set up the same environment for your >> script when run by 'crond' as you have with the interactive shell? >> This is a common problem for users of Cron and is not Cygwin-specific. >> I would suggest pursuing this first if you have not already verified >> that this is not the problem. >> >> Second, if you're accessing any network shares, this won't work by >> default. See >> >> Third, you have both MSYS and Cygwin in your path. You should make sure >> that only Cygwin is in the path that 'crond' sees and uses. I'd say the >> same about Perl. >> > > > Hi, > > How can i setup the interactive shell environment when i am running the > same throught the cron. > i done with PATH=/usr/bin:/usr/sbin:. in cron file other then that what i have > to do. You have to set all the dependencies of your script for your script. You'll need to determine this through some experimentation but usually it comes down to a few key environment variables like PATH, HOME, etc. -- Larry _____________________________________________________________________ A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting annoying in email? -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple