From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19305 invoked by alias); 18 Nov 2014 22:49:46 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 19293 invoked by uid 89); 18 Nov 2014 22:49:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD,URIBL_DBL_ABUSE_REDIR,URIBL_DBL_REDIR autolearn=ham version=3.3.2 X-HELO: etr-usa.com Received: from etr-usa.com (HELO etr-usa.com) (130.94.180.135) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 18 Nov 2014 22:49:43 +0000 Received: (qmail 97642 invoked by uid 13447); 18 Nov 2014 22:49:42 -0000 Received: from unknown (HELO polypore.west.etr-usa.com) ([73.26.17.49]) (envelope-sender ) by 130.94.180.135 (qmail-ldap-1.03) with AES128-SHA encrypted SMTP for ; 18 Nov 2014 22:49:42 -0000 Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: Can't Run Excel From A Cron Job Under Windows 7 From: Warren Young In-Reply-To: <883F2CBBC85A62419E181EB2F0ECF21F3E118128@US70UWXCHMBA04.zam.alcatel-lucent.com> Date: Tue, 18 Nov 2014 22:49:00 -0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <883F2CBBC85A62419E181EB2F0ECF21F3E1169F8@US70UWXCHMBA04.zam.alcatel-lucent.com> <1785488620.20141111221749@yandex.ru> <883F2CBBC85A62419E181EB2F0ECF21F3E118128@US70UWXCHMBA04.zam.alcatel-lucent.com> To: cygwin@cygwin.com X-SW-Source: 2014-11/txt/msg00462.txt.bz2 On Nov 12, 2014, at 9:20 AM, Kertz, Denis (D)** CTR ** wrote: >> More like you expect to run Excel interactively from service. >> Not possible. Period. >=20 > I'm not trying to run Excel interactively from a cron job. One of the li= mitations with using Excel from a cron job is Excel has to run error free.= =20 That=92s not the key issue here. Windows does not allow a service to have a GUI, at all.[1] Unless Excel is= smart enough to not even start its GUI loop when it sees that it is runnin= g as a service =97 as it will be when running under =93cron as service=94 = =97 it will fail. You were offered a choice when running cron-config: to run as a service or = not. If you installed it as a service, try removing the Cygwin cron servic= e[2] and reinstalling it to run under your user account. I tested it here,= and a Bash script was able to launch notepad.exe via cron when run this wa= y. (I did not test the run-as-service case since I haven=92t changed my user p= ermissions per[3] on my test VM, and I don=92t want to. And per above, I d= o not think it would succeed anyway.) This means you will have to leave that computer logged in all the time. Yo= u also need to ensure that /usr/sbin/cron.exe starts on each login. As soo= n as you log out =97 and possibly if the desktop gets locked =97 cron will = go back to failing to run GUI programs. If this also fails, try using the Windows Task Scheduler instead. It=92s m= ore suited to this sort of task. For that matter, why bring Cygwin into this at all? You=92re clearly alrea= dy familiar with VBScript, so why not create a VB app to do all the CreateO= bject() stuff? If your excuse is that you don=92t have Visual Studio, then you have no exc= use, since there is a free version that will suffice for such a simple task= .[4][5] [1] http://stackoverflow.com/questions/53232/ [2] cygrunsrv -R cron [3] http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-nopasswd1 [4] http://www.visualstudio.com/products/visual-studio-express-vs [5] Beware, VSE will go away eventually: http://goo.gl/Cjmq2q -- 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