delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/11/12/20:22:54

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:subject:date:message-id:references
:in-reply-to:content-type:content-transfer-encoding
:mime-version; q=dns; s=default; b=WxinHIEo6FKX4VOgD1mt/9gkpJcOH
G2vR7BTu02WmYMm4G+210dMkDuct/BACrMIaszHrwtE8NngKu3zprw+ShmYwlNbh
i25hKjR23ZNevpo58Xmh75vc+jdVjWiyDmgJCrzRRkqLgmUdUThHxJ76aqJvKXam
GVf7Xlk/LbFb2Y=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:subject:date:message-id:references
:in-reply-to:content-type:content-transfer-encoding
:mime-version; s=default; bh=a9pR4b8KRzSuOYQ9V6rM1pQ3UWA=; b=hc3
Usjhbli+eRdpNHJ393gO30kSXoerbc5a+SwO+OtG0jwcGFVZiEgkqVWfod40vYDY
9w5I/xeBVoFpaWXX1S5f64Au3fugfLvOzYsPjHimlItG5/A5q5D/Dcwb4ZPfQEYd
NWbOpngBC+4bd1KL87YUvoSlBduYebZwzsjcvHYk=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2
X-HELO: smtp-fr.alcatel-lucent.com
From: "Kertz, Denis (D)** CTR **" <d DOT kertz AT alcatel-lucent DOT com>
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Subject: RE: Can't Run Excel From A Cron Job Under Windows 7
Date: Thu, 13 Nov 2014 01:22:11 +0000
Message-ID: <883F2CBBC85A62419E181EB2F0ECF21F3E118381@US70UWXCHMBA04.zam.alcatel-lucent.com>
References: <883F2CBBC85A62419E181EB2F0ECF21F3E1169F8 AT US70UWXCHMBA04 DOT zam DOT alcatel-lucent DOT com> <1785488620 DOT 20141111221749 AT yandex DOT ru> <883F2CBBC85A62419E181EB2F0ECF21F3E118128 AT US70UWXCHMBA04 DOT zam DOT alcatel-lucent DOT com> <1991456701 DOT 20141112231225 AT yandex DOT ru>
In-Reply-To: <1991456701.20141112231225@yandex.ru>
MIME-Version: 1.0
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id sAD1MovU032034

>> What I mean by runs fine is that when I type this command at a bash prompt:
>>         run.excel  'c:\Shared\Bin\Create_Daily_Scorecard.xls'
>> it runs to completion and creates a new .xls as its output.  When I run
>> this run.excel script from a cron job it hangs.
>
> Hangs as in - do not create new file?

Hangs as in never finishes and I don't know what, if anything, it has done.  But that suggests some tests for me to run that I should have thought of.  First, create a test .xls that does nothing and see if that runs to completion.  If it does, then create a test .xls that simply creates a file to test whether it actually creates the file.

>> I'm not trying to run Excel interactively from a cron job.  One of the
>> limitations with using Excel from a cron job is Excel has to run error free.
>> If Excel does run into some error it will typically generate an error
>> message and wait for a user response.  Since Excel is running invisibly from
>> a cron job, there is no user to give a response and Excel just sits there
>> waiting for a response that will never come.
>
> Try starting cron in terminal session and see if anything comes up.

Can you tell me how to do this?  When I run the ps command in a terminal session, I see this:
$ ps
      PID    PPID    PGID     WINPID   TTY     UID    STIME COMMAND
     5780    5568    5780       3408  pty0    1000   Nov  5 /usr/bin/bash
     5568       1    5568       5568  ?       1000   Nov  5 /usr/bin/mintty
     3716    5780    3716       1016  pty0    1000 18:58:16 /usr/bin/ps
     1820       1    1820       1820  ?       1000   Nov  5 /usr/bin/cygrunsrv
     1856    1820    1856       1892  ?       1000   Nov  5 /usr/sbin/cron

Do I have to kill the cygrunsrv and cron processes and then ??

>> Why "of course"?  Shouldn't I be able to kill my own processes?
>
> It's not "your own" process, it's "cron job" started with your credentials.
>
>> I can certainly do that under WinXP.
>
> Again, only if you logged in as admin.
> This is not the case in Vista+ by default.

Okay, I think what you are telling me is that the login I'm using on "my" WinXP PC (which I inherited) must be an administrator login and the login I'm using on the Win7 PC is not an administrator login (it isn't).  That sounds plausible (I know a lot more about UNIX than I do about Windows).  So the differences I'm seeing between WinXP and Win7 is due to using/not using an administrator login, not due to whether it is WinXP or Win7.

Denis

--
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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019