This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Can't Run Excel From A Cron Job Under Windows 7


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]