delorie.com/archives/browse.cgi | search |
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:date:from:reply-to:message-id:to:subject | |
:in-reply-to:references:mime-version:content-type | |
:content-transfer-encoding; q=dns; s=default; b=uU7tYdqXZqhFhaWZ | |
bY+wbK0HragTceh5FdGQz6cN9j52MWcR6DDVjisECsteKADCJYR3u+s4JTYvsjug | |
I6Lsp00VkYjM+7ke5339OxKPcWKWvWB8rJJgR2cJVPUvLzrN8t5DHW/H/86oS87y | |
QOo+W+hwvZpf3UIQgxB2cLtaNHI= | |
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:date:from:reply-to:message-id:to:subject | |
:in-reply-to:references:mime-version:content-type | |
:content-transfer-encoding; s=default; bh=ylm8DKCHHMDXwCJNdGGRbu | |
8+kaA=; b=TMpOp2E84k5kKkvhCebXFo8Y2kyUku40+lpQIa0zVNQJjXgzVzIuI5 | |
8UyfL4NNg4BhofEojhcU6jqQ9kxoMbwYwhc56An9YcEoERFFCs1sD3VQbju8Rmah | |
FDFplXVeNDXa8w+3DNg5//kaJHCY+GQyFI7XVjjz1TkTxlXsEqbwE= | |
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=-3.3 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,KAM_THEBAT,SPF_SOFTFAIL autolearn=no version=3.3.2 |
X-HELO: | smtp.ht-systems.ru |
Date: | Wed, 12 Nov 2014 23:12:25 +0300 |
From: | Andrey Repin <anrdaemon AT yandex DOT ru> |
Reply-To: | cygwin AT cygwin DOT com |
Message-ID: | <1991456701.20141112231225@yandex.ru> |
To: | "Kertz, Denis (D)** CTR **" <d DOT kertz AT alcatel-lucent DOT com>, |
cygwin AT cygwin DOT com | |
Subject: | Re: Can't Run Excel From A Cron Job Under Windows 7 |
In-Reply-To: | <883F2CBBC85A62419E181EB2F0ECF21F3E118128@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> |
MIME-Version: | 1.0 |
X-IsSubscribed: | yes |
Greetings, Kertz, Denis (D)** CTR **! >>> An excel program is run like this: >> >>> run.excel 'c:\Shared\Bin\Create_Daily_Scorecard.xls' >> >>> When I run an Excel program interactively with this run.excel script it >>> runs just fine but when I run it via a cron job Excel just hangs. >> >> Define "runs fine" please? >> What exactly that excel script is doing? > This run.excel script simply starts up Excel with the .xls file it is > given. In this example Excel opens > c:\Shared\Bin\Create_Daily_Scorecard.xls. This .xls has a Workbook_Open > macro, which is automatically run whenever this .xls is opened, that reads > some data files and creates another .xls as its output. > 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? >>> When Excel hangs I can look at the processes running on the PC using the >>> Windows Task Manager and I don't see the EXCEL.EXE process. But when I >>> check the option to show processes from all users I see the hung EXCEL.EXE >>> process, AND the user name displayed is my login. So I am running this under the >>> Upar2 login and Task Manager doesn't display EXCEL.EXE as a Upar2 process >>> but when I check 'Show processes from all users' it shows EXCEL.EXE running >>> under user name Upar2 - a contradiction. >> >> Task manager display processes started in your current session. >> Not processes started under your credentials. That's an important difference. > Then this is just a difference between WinXP and Win7? It was the case in Vista already. > Under WinXP it shows EXCEL.EXE in my process list even when the "Show > processes from all users" isn't checked. Only if you logged in as admin. >>> What I suspect is happening is Excel is attempting to do something that >>> requires Upar2 permission but it isn't really running as Upar2 so Excel >>> displays some error message and is waiting for the user to respond. But >>> Excel is running invisibly so this can't be seen. >> >> More like you expect to run Excel interactively from service. >> Not possible. Period. > 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. >>> I also suspect this Upar2 "confusion" isn't limited to running an Excel >>> program. I can run a cron job with regular UNIX commands (cut, sort, etc) >>> and see they are running with the ps command. But when I try to kill them >>> (kill -9) I get permission denied. If I want to kill a process running via >>> the cron I have to start cygwin with 'Run as administrator' and then I can >>> kill processes running under the cron. >> >> Of course. > 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. > But this isn't a major issue for me. I only > pointed it out in case it was related to the issue why my Excel cron jobs hang. -- WBR, Andrey Repin (anrdaemon AT yandex DOT ru) 12.11.2014, <23:08> Sorry for my terrible english... -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |