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: CRON problems


Mark,

Thanks for the sugestion. So, I just ran cron diagnose.sh (ver. 1.5) and it 
tells me that my cron is installed just fine, but even a simple "hello world" 
doesnt work.  This is pretty wierd because if I do a ps -elf cron doesn't show 
up anywhere, here's the output:

     UID     PID    PPID TTY     STIME COMMAND
  SYSTEM     640       1   ?  21:55:14 /usr/bin/cygrunsrv
  SYSTEM     672     640   ?  21:55:15 /usr/sbin/sshd
   stats    1136       1   0  21:55:41 /usr/bin/bash
   stats    1380    1136   0  23:14:40 /usr/bin/ps


I went throught the suggested steps of remove, uninstall, reinstall and 
starting the service, but I get the same error message as before:

$ cygrunsrv -S cron > error.cron
cygrunsrv: Error starting a service: QueryServiceStatus:  Win32 error 1062:
The service has not been started.

So I removed /var/run/cron.pid and tried the suggested steps once more, but 
alas, same error.

Am I totally missing something here? In the 
file /usr/share/doc/Cygwin/cron.README, it says:
"On NT/W2K run cron under SYSTEM account
as service to use that feature."

Is there a way to run cron under the SYSTEM account, i.e. do I need to login as 
SYSTEM and repeat the steps described above? 

Thansk for your help.
Hank

-- 
----------------------------------------
Hank Statscewich                      
Institute of Marine Science
University of Alaska, Fairbanks
PO Box 757220
Fairbanks, AK, 99775-7220
Phone: (907) 474-5720
Cell:  (907) 322-0309
fax:   (907) 474-7204
email: stats@ims.uaf.edu
web: www.salmonproject.org
----------------------------------------


Quoting "Harig, Mark" <maharig@idirect.net>:

> Please run cron_diagnose.sh version 1.5.
> Numerous bugs have been found and fixed.
> 
> This version can be found (as an attachment)
> on the mailing list at:
> 
> http://sources.redhat.com/ml/cygwin/2004-03/msg00379.html
> 
> > -----Original Message-----
> > From: Hank Statscewich
> > Sent: Wednesday, May 05, 2004 8:12 PM
> > To: cygwin
> > Subject: CRON problems
> > 
> > 
> > Hello,
> > 
> > I've been doing my best to read all the previous FAQ pages, 
> > README documents, 
> > and forum posts, but I am still having issues getting my cron 
> > jobs to run the 
> > way I want them to. If I explicitly start cron by calling 
> > /usr/sbin/cron, then 
> > my jobs run fine, but my application demands that the 
> > computer be rebooted 
> > daily and I will not be onsite to issue this comand. I would 
> > like cron to start 
> > up after reboot automatically and if I understand correctly, this is 
> > accomplished by following the instructions in 
> > cron_diagnose.sh which describe 
> > how to shutdown the cron service, uninstall it, reinstall it 
> > and start it. 
> > Everything works just fine except for starting the service, 
> > when I run: 
> > cygrunsrv -S cron. I get this error message:
> > cygrunsrv: Error starting a service: QueryServiceStatus:  
> > Win32 error 1062:
> > The service has not been started.
> > 
> > After reading through some more posts I have become 
> > thoroughly confused, so I 
> > have resorted to asking for help. 
> > The output from cron_diagnose.sh is:
> > cron_diagnose.sh 1.2
> > 
> > This script did not find any errors in your crontab setup.
> > If you are still unable to get cron to work, then try
> > shutting down the cron service, uninstalling it,
> > reinstalling it, and restarting it.
> > 
> > The following commands will do that:
> >   $ cygrunsrv --stop cron
> >   $ cygrunsrv --remove cron
> >   $ cygrunsrv --install cron -p /usr/sbin/cron -a -D
> >   $ cygrunsrv --start cron
> > 
> > If none of this fixes the problem, then report your problem
> > to cygwin@cygwin.com.  Please include a copy of your crontab,
> > ('crontab -l') and the output of 'cygcheck -srv > cygcheck.txt'.
> > 
> > PLEASE include the generated files 'cygcheck.txt' *as an attachment*,
> > and NOT in the body of the mail message.
> > 
> > 
> > My crontab looks like this:
> > # DO NOT EDIT THIS FILE - edit the master and reinstall.
> > # (/tmp/crontab.1244 installed on Wed May  5 23:57:19 2004)
> > # (Cron version -- $Id: crontab.c,v 1.7 2003/04/15 15:13:41 
> > corinna Exp $)
> > 53 21 * * * shutdown -r -f now
> > 58 * * * * tcsh /home/stats/Trans/programs/hourly_mover.tcsh
> > 03 22 * * * tcsh /home/stats/Trans/programs/daily_mover.tcsh 
> > 
> > Thanks in advance for your help. I have attatched 
> > cygcheck.txt as instructed.
> > 
> > Hank
> > 
> > -- 
> 
> > 
> > 
> > 
> > 
> 


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


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