Running cron as a user other than system

Larry Hall (Cygwin) reply-to-list-only-lh@cygwin.com
Mon Jul 24 19:53:00 GMT 2006


Earl Box wrote:
> I am trying to run a build script via crontab and am dying
> because crontab is run as system and one of the commands
> in my scripts requires that I run as a specific user.
> 
> I've tried many things
> 
> 	cygrunsrv -I cron -p /usr/sbin/cron -a -D -u SCROOGE2\\builder
> 	- - - - - - - - - - - - - - - - - - - - - - > builder
> 
> I'm getting this error and can't get past it.
> 
> 	cygrunsrv: Error starting a service: QueryServiceStatus:  
> 	Win32 error 1062:  The service has not been started.
> 
> I have just recently install cygwin as I am moving away from
> MKS Toolkit.

<snip>

> SHELL = 'C:/PROGRA~1/MKSTOO~1/mksnt/sh.exe'

<snip>

> TERMCAP = 'C:\PROGRA~1\MKSTOO~1\etc\termcap'

Correct these environment variables.  Make sure nothing sees MKS anymore.

<snip>

>  1831k 2006/07/01 C:\cygwin\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0
>                   "cygwin1.dll" v0.0 ts=2006/7/1 0:22
>     Cygwin DLL version info:
>         DLL version: 1.5.20
>         DLL epoch: 19
>         DLL bad signal mask: 19005
>         DLL old termios: 5
>         DLL malloc env: 28
>         API major: 0
>         API minor: 156
>         Shared data: 4
>         DLL identifier: cygwin1
>         Mount registry: 2
>         Cygnus registry name: Cygnus Solutions
>         Cygwin registry name: Cygwin
>         Program options name: Program Options
>         Cygwin mount registry name: mounts v2
>         Cygdrive flags: cygdrive flags
>         Cygdrive prefix: cygdrive prefix
>         Cygdrive default prefix: 
>         Build date: Sat Jul 1 02:22:36 EDT 2006
>         Shared id: cygwin1S4
> 
>  1163k 2006/03/14 \bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0
>                   "cygwin1.dll" v0.0 ts=2005/4/25 18:26
>     Cygwin DLL version info:
>         DLL version: 1.5.16
>         DLL epoch: 19
>         DLL bad signal mask: 19005
>         DLL old termios: 5
>         DLL malloc env: 28
>         API major: 0
>         API minor: 128
>         Shared data: 4
>         DLL identifier: cygwin1
>         Mount registry: 2
>         Cygnus registry name: Cygnus Solutions
>         Cygwin registry name: Cygwin
>         Program options name: Program Options
>         Cygwin mount registry name: mounts v2
>         Cygdrive flags: cygdrive flags
>         Cygdrive prefix: cygdrive prefix
>         Cygdrive default prefix: 
>         Build date: Mon Apr 25 20:26:35 EDT 2005
>         Shared id: cygwin1S4
> 
> Warning: There are multiple cygwin1.dlls on your path


Ugh!  Get rid of the old cygwin1.dll and try again.  I'd also recommend
updating to 1.5.21.

-- 
Larry Hall                              http://www.rfk.com
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
216 Dalton Rd.                          (508) 893-9889 - FAX
Holliston, MA 01746

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list