Re: cron problems

2008-05-14 Thread Pierre A. Humblet

- Original Message - 
From: Charles Miller 
To: cygwin@cygwin.com
Sent: Wednesday, May 14, 2008 5:47 PM
Subject: cron problems


I'm a little confused. Ps -eaf shows the cron process running. However Windows 
Services say that 
it is not. My crontab is coming back with incorrect permissions. Can you let me 
know what I need 
to do to get cron working ?
*

You have a cron service defined but stopped under the account cron_server
but you also have a cron process running ./cron under account administrator 
(10500).
It was not launched as a service and it has locked /var/run/cron.pid, 
preventing other
crons from running.

In addition you seem to have users called both Administrator and also 
administrator, which is 
suspicious.

The group of administrator is mkgroup-l-d, which suggests that your /etc/group 
file is not up to 
date.
The uid of administrator  is 10500, it is probably a domain administrator who 
may not be
in /etc/passwd.

Pierre



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



Re: cron problems

2007-11-06 Thread Pierre A. Humblet

- Original Message - 
From: Helge Stenström 
To: cygwin
Sent: Tuesday, November 06, 2007 9:48 AM
Subject: cron problems


snip
| I no longer remember the exact questions, but there are some issues.
Yes, there always are issues but I am not sure why.

| 1. cron-config asked about my password, and it was visible in
| cleartext when I entered it. Is that a bug?
I would be happy to improve the cron-config script if someone proposes
a simple solution.

| 2. What is the password used for? A policy forces me to change
| password on my Windows account every 60 days. Will the cron daemon try
| to use the old password, so that I will be locked out from the
| account? If that happens, it will be difficult to fix, because I
| cannot login.
If you run cron as yourself, Windows requires a password.
Windows will enforce your system policy. Your system administrator can
change it.

| 3. After I enabled cron, I installed a program. It took much longer
| than expected, 35 minutes instead of 2-5 minutes. Meanwhile, there
| were many ( 10 each) processes that used a lot of memory:
|
| cron.exe (1.5M)
| sh.exe (3.6M)
|
| I manually killed these processes, and the intallation could finally finnish.
| The crontab at this time consisted of touch filename every minute.
| Shouldn't load the CPU.
| Is this a known issue?
The amount of memory per process looks normal. But how many cron.exe
processes did you see? Were the sh processes running under cron?
If there is a bug it's more likely to be in your cron jobs than in cron itself.
Have them produce some output so you can figure out what they do
and how long it takes.

Pierre 


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



Re: CRON problems

2007-05-14 Thread Pierre A. Humblet

- Original Message - 
From: sabbella
To: cygwin
Sent: Monday, May 14, 2007 10:35 AM
Subject:  CRON problems


| Hi,
| 
| I have process scheduling my tasks under cygwin unsing CRON. I have
| started the cron service by running the script usr/bin/cron-config.
| 
| cron_diagnose.sh reports zero errors. ps -a shows cron service being started.
| 
| I have attached the output from crontab -l and cygcheck -srv to this mail.
| Please let me know what I am doing wrong.

Can you describe what the problem is? 
If your cron job doesn't run, how do you know it doesn't?
20 15 * * *  mean 3:20 PM every day, which doesn't match the comments
in the crontab.

What are the cron related entries in the Windows event log?
Are there /home/regression/cron.log file and/or /tmp/cron-XXX files
with useful info?


Pierre

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



Re: Cron Problems

2006-07-24 Thread René Berber
Andrew King wrote:

 Before I get started, please note that I'm a complete Cygwin newbie, so
 try to bear with me.
 
 We had Cron running on a system to check the integrity of our backups,
 but the drive went out.  We had a backup of the drive before it went
 out.  My boss now wants me to make the Cron run again from the backup of
 the Cygwin directory, and I've never worked with Cygwin in my life.  So
 I really don't know what I'm doing.  I tried running cygrunsrv -I Cron
 -p /bin/crontab.exe to install the service.  The service installs, but
[snip]

Wrong, the service is not installed that way.

Read /usr/share/doc/Cygwin/cron.README first, then uninstall the mess you did
with cygrunsrv -R Cron before you install it again.

Second, you should really learn about how to use cron.  The documentation of the
installed cron can be seen with man cron, man crontab, man 5 crontab.  Any
 documentation from the Web could also be useful.
-- 
René Berber


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



RE: Cron Problems with Cygwin

2005-10-24 Thread CWS Informatics [Sas]
I am not sure what else you want based on reporting guidelines. I
attached the cygcheck file though.

As for what I am trying to do: 

We have a bunch of old Unix scripts and software that we need to keep
running for awhile. 
These need to run every x minutes for y range of hours during the day.
The scripts and software produce the results we are looking when run
from the command line in Cygwin. 

There is nothing but Cron Started [number] in the cron log.

Thank you.


-Original Message-
From: Larry Hall (Cygwin) [mailto:[EMAIL PROTECTED] 
Sent: Sunday, October 23, 2005 4:39 PM
To: CWS Informatics [Sas]
Cc: cygwin@cygwin.com
Subject: Re: Cron Problems with Cygwin


CWS Informatics [Sas] wrote:
 I am having trouble getting the cron to run properly under Windows 
 2000 and XP with cygwin.
 
 I have searched through several threads on the mailing list, including

 these most relevant ones: The solutions did not overly work, although 
 they did help me progress a little bit.
 
 http://www.cygwin.com/ml/cygwin/2001-12/msg01123.html
 http://www.mail-archive.com/cygwin@cygwin.com/msg29278.html
 http://www.cygwin.com/ml/cygwin/2003-09/msg01855.html
 http://www.cygwin.com/ml/cygwin/2003-09/msg00803.html
 
 The service appears to install and start with no problems. The crontab

 files are correct and the cron service is running my tasks as I had 
 set them. For example, I have a task set to run eveyr 5 minutes, and I

 see an event in the event viewer every 5 minutes saying CMD 
 (/home/test/test) as part of it; this is indeed the what I was trying

 to run every 5 minutes (just a test). However, nothing happens. The 
 command is supposed to be a script that does a bunch of other stuff 
 (for testing it simply append echoes the time to a file), but it never

 happens. If I run the script just from the command line it works fine.
 
 The events are running as SYSTEM at least the event viewer shows them 
 as SYSTEM. All associated cron files are owned by system.
 I have tried changing the permissions and modes of some of the files
as
 mentioned in the above threads - no difference.
 
 The full text of the event log entry for the task being run is: The 
 description for Event ID ( 0 ) in Source ( /usr/sbin/cron ) cannot be 
 found. The local computer may not have the necessary registry 
 information or message DLL files to display messages from a remote 
 computer. You may be able to use the /AUXSOURCE= flag to retrieve this

 description; see Help and Support for details. The following 
 information is part of the event: /usr/sbin/cron : PID 3816 : (scoop) 
 CMD (/home/test/test).
 
 I would appreciate any insight into what may or may not be working.


Please read and follow the problem reporting guidelines found at:

 Problem reports:   http://cygwin.com/problems.html

Configuration information and details of what you're doing would also be
helpful.

You may find more info in '/var/log/cron'.

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


cygcheck.out
Description: cygcheck.out
--
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/

Re: Cron Problems with Cygwin

2005-10-24 Thread Larry Hall (Cygwin)

CWS Informatics [Sas] wrote:

I am not sure what else you want based on reporting guidelines. I
attached the cygcheck file though.



Thanks.  I was also looking for details about your failing cron commands.


As for what I am trying to do: 


We have a bunch of old Unix scripts and software that we need to keep
running for awhile. 
These need to run every x minutes for y range of hours during the day.

The scripts and software produce the results we are looking when run
from the command line in Cygwin. 


There is nothing but Cron Started [number] in the cron log.



So it sounds like cron thinks everything is fine.



Thank you.



OK, then let's go back to basics.  Clear your crontab out of everything but
the following line:

1 * * * *   /bin/echo hi /tmp/cron.out

Do you get a /tmp/cron.tab with hi in it after a minute?  If so, then you
need to look at your originalcrontab commands and figure out which ones
are causing you the problem.  From the output, it would suggest that you're
invoking 'cmd' for something.  That may be causing you some problem.  If
you don't get any output with the simple crontab file, you probably want to
uninstall and reinstall the cron package, reading
'/usr/share/doc/Cygwin/cron.README' immediately after installing.

--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
838 Washington Street   (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/



Re: Cron Problems with Cygwin

2005-10-24 Thread René Berber
Larry Hall (Cygwin) wrote:
[snip]
 1 * * * *   /bin/echo hi /tmp/cron.out

You meant:

* * * * *  /bin/echo :hi: /tmp/cron.out

-- 
R. Berber


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



Re: Cron Problems with Cygwin

2005-10-23 Thread Larry Hall (Cygwin)

CWS Informatics [Sas] wrote:

I am having trouble getting the cron to run properly under Windows 2000
and XP with cygwin.

I have searched through several threads on the mailing list, including
these most relevant ones:
The solutions did not overly work, although they did help me progress a
little bit.

http://www.cygwin.com/ml/cygwin/2001-12/msg01123.html
http://www.mail-archive.com/cygwin@cygwin.com/msg29278.html
http://www.cygwin.com/ml/cygwin/2003-09/msg01855.html
http://www.cygwin.com/ml/cygwin/2003-09/msg00803.html

The service appears to install and start with no problems.
The crontab files are correct and the cron service is running my tasks
as I had set them. For example, I have a task set to run eveyr 5
minutes, and I see an event in the event viewer every 5 minutes saying
CMD (/home/test/test) as part of it; this is indeed the what I was
trying to run every 5 minutes (just a test).
However, nothing happens. The command is supposed to be a script that
does a bunch of other stuff (for testing it simply append echoes the
time to a file), but it never happens. If I run the script just from the
command line it works fine.

The events are running as SYSTEM at least the event viewer shows them as
SYSTEM.
All associated cron files are owned by system.
I have tried changing the permissions and modes of some of the files as
mentioned in the above threads - no difference.

The full text of the event log entry for the task being run is:
The description for Event ID ( 0 ) in Source ( /usr/sbin/cron ) cannot
be found. The local computer may not have the necessary registry
information or message DLL files to display messages from a remote
computer. You may be able to use the /AUXSOURCE= flag to retrieve this
description; see Help and Support for details. The following information
is part of the event: /usr/sbin/cron : PID 3816 : (scoop) CMD
(/home/test/test).

I would appreciate any insight into what may or may not be working.



Please read and follow the problem reporting guidelines found at:


Problem reports:   http://cygwin.com/problems.html


Configuration information and details of what you're doing would also
be helpful.

You may find more info in '/var/log/cron'.

--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
838 Washington Street   (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/



Re: Cron problems with cygwin...

2005-07-27 Thread Pierre A. Humblet
Igor Pechtchanski wrote:

 Third, please run the cron_diagnose.sh script and examine the results.
 If it's a simple permission issue, that script should catch it.

cron_diagnose.sh was not designed for Win2003 and is not a good
diagnostic tool there. It won't catch all permissions issues and may raise
false alarms.
As far as I know, all the tests performed by cron_diagnose.sh are
included in cron-config. 
We should stop pointing to cron_diagnose.sh, except possibly in a
case (I have not seen one yet) where cron-config does not produce
a working cron environment. If that happens, it would be helpful to
report precisely what was wrong and how it had to be fixed.

Pierre
 


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



RE: Cron problems with cygwin...

2005-07-27 Thread Etienne Mbuyi
Ye, cron-config is the way to go. I used on my last install and thanks to
Pierre, it solved my problem.
Another point I would like to make here is that Igor needs to be a bit more
kind in his reply. It doesn't help if you make people feel stupid. Not
everyone is an EXPERT like you.
Anyway thanks Pierre for your help and contributions.


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Pierre A. Humblet
Sent: Wednesday, July 27, 2005 10:09 AM
To: cygwin@cygwin.com
Subject: Re: Cron problems with cygwin...

Igor Pechtchanski wrote:

 Third, please run the cron_diagnose.sh script and examine the results.
 If it's a simple permission issue, that script should catch it.

cron_diagnose.sh was not designed for Win2003 and is not a good
diagnostic tool there. It won't catch all permissions issues and may raise
false alarms.
As far as I know, all the tests performed by cron_diagnose.sh are
included in cron-config. 
We should stop pointing to cron_diagnose.sh, except possibly in a
case (I have not seen one yet) where cron-config does not produce
a working cron environment. If that happens, it would be helpful to
report precisely what was wrong and how it had to be fixed.

Pierre
 


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




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



Re: Cron problems with cygwin...

2005-07-27 Thread Christopher Faylor
On Wed, Jul 27, 2005 at 10:49:24AM -0400, Etienne Mbuyi wrote:
Ye, cron-config is the way to go. I used on my last install and thanks to
Pierre, it solved my problem.
Another point I would like to make here is that Igor needs to be a bit
more kind in his reply.  It doesn't help if you make people feel
stupid.  Not everyone is an EXPERT like you.

Igor wasn't addressing you in his reply, so I'm not sure why you are
stepping in here.  Igor's email was addressed to Kevin Markle who sent
him private email rather than using the mailing list.

His reply was not unkind.  You are totally misreading his attempt to
help.

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



RE: Cron problems with cygwin...

2005-07-27 Thread Etienne Mbuyi
When I first posted my problem with cron-cygwin, I got a reply from him that
I still don't think was kind. 
If I misread his attempt to help me, then I apologize. 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Christopher Faylor
Sent: Wednesday, July 27, 2005 11:02 AM
To: cygwin@cygwin.com
Subject: Re: Cron problems with cygwin...

On Wed, Jul 27, 2005 at 10:49:24AM -0400, Etienne Mbuyi wrote:
Ye, cron-config is the way to go. I used on my last install and thanks to
Pierre, it solved my problem.
Another point I would like to make here is that Igor needs to be a bit
more kind in his reply.  It doesn't help if you make people feel
stupid.  Not everyone is an EXPERT like you.

Igor wasn't addressing you in his reply, so I'm not sure why you are
stepping in here.  Igor's email was addressed to Kevin Markle who sent
him private email rather than using the mailing list.

His reply was not unkind.  You are totally misreading his attempt to
help.

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




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



Re: Cron problems with cygwin...

2005-07-27 Thread Christopher Faylor
On Wed, Jul 27, 2005 at 11:08:33AM -0400, Etienne Mbuyi wrote:
When I first posted my problem with cron-cygwin, I got a reply from him
that I still don't think was kind.

Well, with any luck his manager is monitoring this list (this mailing
list may be monitored for quality assurance purposes) and he will get a
stern rebuke for his unkind technical support behavior, especially if
your cygwin service contract called for kind behavior.

I've just reread the email from July 19 and I think that you might find
http://www.catb.org/~esr/faqs/smart-questions.html instructive if you
haven't read it yet.

cgf

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



RE: Cron problems with cygwin...

2005-07-27 Thread Larry Hall
At 11:08 AM 7/27/2005, you wrote:
When I first posted my problem with cron-cygwin, I got a reply from him that
I still don't think was kind. 
If I misread his attempt to help me, then I apologize. 



You mean this?

http://sourceware.org/ml/cygwin/2005-07/msg00862.html

If so then yes, you misread it.  If you're referring to some other post,
I can't speak to that other than to say I read every message from Igor
on this list and can't remember one that I'd characterize as unkind.  If
you take a look through the email archives, you'll see he's genuinely 
trying to help with his posts.


--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
838 Washington Street   (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/



RE: Cron problems with cygwin...

2005-07-27 Thread Etienne Mbuyi
Again, if I misread his email, I sincerely apologize. 

-Original Message-
From: Larry Hall [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 27, 2005 11:27 AM
To: Etienne Mbuyi; cygwin@cygwin.com
Subject: RE: Cron problems with cygwin...

At 11:08 AM 7/27/2005, you wrote:
When I first posted my problem with cron-cygwin, I got a reply from him
that
I still don't think was kind. 
If I misread his attempt to help me, then I apologize. 



You mean this?

http://sourceware.org/ml/cygwin/2005-07/msg00862.html

If so then yes, you misread it.  If you're referring to some other post,
I can't speak to that other than to say I read every message from Igor
on this list and can't remember one that I'd characterize as unkind.  If
you take a look through the email archives, you'll see he's genuinely 
trying to help with his posts.


--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
838 Washington Street   (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/



RE: Cron problems with cygwin...

2005-07-27 Thread Kevin Markle
 

Thanks!


-Original Message-
From: Igor Pechtchanski [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 27, 2005 12:10 AM
To: Kevin Markle
Cc: cygwin@cygwin.com
Subject: Re: Cron problems with cygwin...

Kevin,

http://cygwin.com/acronyms/#PPIOSPE.  Thanks.  I'm redirecting this reply
to the Cygwin mailing list, and setting Reply-To appropriately.

On Tue, 26 Jul 2005, Kevin Markle wrote:

 Hello,

 I was looking on the web for my windows 2003 cygwin cron prolems and 
 it appears that you have a way to get this to work. If you can help me 
 out on this I would appreciate it. Do I need to run cron-config before 
 running this command? Are these 2 thing all that I need to do to get 
 cron to work? I have been able to get the service to run but none of 
 the items in the crontab file run?

 cygrunsrv -I cron -p /usr/sbin/cron -a -D -u svccron -w passwd

 Thanks!
 Kevin Markle

I don't have Windows 2003, and I haven't run cron in a while.  However, I do
have some general comments about your problem:

First, please review and follow the Cygwin problem reporting guidelines at
http://cygwin.com/problems.html, particularly the part in bold that asks
you to attach the output of cygcheck -svr on your system.

Second, I'm not sure which 2 things you are referring to.  As far as I
recall, cron-config will actually install the cron service for you, so there
is no need for a separate cygrunsrv -I command.  That script will even
offer to start the service, so you won't even need a cygrunsrv -S
command.

Third, please run the cron_diagnose.sh script and examine the results.
If it's a simple permission issue, that script should catch it.

Lastly, examine the logs (/var/log/cron.log and the Windows Event log) for
any signs of errors.  Also check whether you are properly redirecting the
output in your crontab (if not, cron may be looking for a sendmail program).
HTH,
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

If there's any real truth it's that the entire multidimensional infinity of
the Universe is almost certainly being run by a bunch of maniacs. /DA



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



Re: Cron problems with cygwin...

2005-07-26 Thread Igor Pechtchanski
Kevin,

http://cygwin.com/acronyms/#PPIOSPE.  Thanks.  I'm redirecting this
reply to the Cygwin mailing list, and setting Reply-To appropriately.

On Tue, 26 Jul 2005, Kevin Markle wrote:

 Hello,

 I was looking on the web for my windows 2003 cygwin cron prolems and it
 appears that you have a way to get this to work. If you can help me out
 on this I would appreciate it. Do I need to run cron-config before
 running this command? Are these 2 thing all that I need to do to get
 cron to work? I have been able to get the service to run but none of the
 items in the crontab file run?

 cygrunsrv -I cron -p /usr/sbin/cron -a -D -u svccron -w passwd

 Thanks!
 Kevin Markle

I don't have Windows 2003, and I haven't run cron in a while.  However, I
do have some general comments about your problem:

First, please review and follow the Cygwin problem reporting guidelines at
http://cygwin.com/problems.html, particularly the part in bold that asks
you to attach the output of cygcheck -svr on your system.

Second, I'm not sure which 2 things you are referring to.  As far as I
recall, cron-config will actually install the cron service for you, so
there is no need for a separate cygrunsrv -I command.  That script will
even offer to start the service, so you won't even need a cygrunsrv -S
command.

Third, please run the cron_diagnose.sh script and examine the results.
If it's a simple permission issue, that script should catch it.

Lastly, examine the logs (/var/log/cron.log and the Windows Event log) for
any signs of errors.  Also check whether you are properly redirecting the
output in your crontab (if not, cron may be looking for a sendmail
program).
HTH,
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. /DA

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



Re: cron problems with windows 2003 server

2005-01-20 Thread Pierre A. Humblet
On Thu, Jan 20, 2005 at 05:57:27PM -0800, Jay Patel wrote:
 CYGWIN_NT-5.2 hal 1.5.12(0.116/4/2) 2004-11-10 08:34 i686 unknown 
 unknown Cygwin
 
 Logged in as Administrator I have installed the cron service with:
 cygrunsrv -I cron -p /usr/sbin/cron -a '-D' -e CYGWIN=tty ntsec 
 binmode -d CYGWIN cron
 
 The process is running, but my cron jobs for Administrator are not being 
 run. 
 
 I have changed the group for /var/run and /etc/cron.d to 18 (SYSTEM) and 
 both directories have 1777 permissions.  I also have setup a simple test 
 to run every minute to see if it's working:
 
 # DO NOT EDIT THIS FILE - edit the master and reinstall.
 # (/home/Administrator/test.txt installed on Thu Jan 20 17:44:39 2005)
 # (Cron version -- $Id: crontab.c,v 1.8 2004/12/21 16:14:41 corinna Exp $)
 * * * * * /usr/bin/date  /home/Administrator/test.log
 
 I'm guessing it's a permissions problem or some Windows user related 
 issue.  Any help in figuring this out is appreciated.  I have attached 
 the cygcheck results as requested by the cron_diagnose.sh script I've 
 been using to figure out what's going on.  Thanks.
 
Yes, and a privilege issue. 

There is now a cron-config script that should do the right thing, although
it has not been tested on Win2003...
Please try it and report any issues.

Pierre

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



Re: CRON problems

2004-05-07 Thread Brian Dessent
Andrew DeFaria wrote:

   # Install cron service:
   cygrunsrv -I cron -p /usr/sbin/cron -a -D -d Cygwin cron -e
 [EMAIL PROTECTED] -e CYGWIN=ntsec
   ^^

As an aside, hasn't 'ntsec' been enabled by default for a long time
now?  Or am I just remembering incorrectly?

Brian

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



RE: CRON problems

2004-05-07 Thread Harig, Mark
 
 Hmm, seems to me like checking ownership and permissions of cron.pid
 would be something the cron_diagnose.sh should do.  What happened was
 that you ran it initially as your normal user account, and 
 the pid file
 was created.  Then when you tried to start it as a service, it was
 running as the SYSTEM account which didn't have permissions 
 to overwrite
 the file.  The solution would be to either just remove it and let cron
 recreate it, or chown SYSTEM:SYSTEM /var/run/cron.pid.  
 Then you could
 give it more restrictive permissions than 777, perhaps 640 or 600.
 

At present, the diagnostic script only checks for the existence of
/var/run/cron.pid and, if found, suggests that the user delete it
before reinstalling/restarting the cron service.

I agree that the script should check for SYSTEM.SYSTEM ownership
and 640 permissions, but I have not been able to find any
documentation specifying this.  Can anyone please point me to
some that specifies what the ownership and permissions of cron.pid
should be?  Of course, if users simply do what cron_diagnose.sh
suggests today, that should resolve this particular problem (i.e.,
not being able to write to the cron.pid file).

---

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



RE: CRON problems

2004-05-07 Thread Harig, Mark
 
 Two places to look for the actual error are /var/log/cron.log and the
 Windows event log.  Perhaps Mark can add this to the output of his
 script...
   Igor
 -- 

I assume that what you are suggesting is that some
text pointing the user to /var/log/cron.log be added,
not actually displaying the log file.  Is this correct?

I am hesitant to display the contents of the log
file because it adds to the text displayed, and there
have been a number of problems reported simply
because users do not read the output of the
script carefully.  In addition, the log can get
long.

---

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



RE: CRON problems

2004-05-07 Thread Harig, Mark
Please delete respondents' email addresses
from any replies.  Spammers harvest
email addresses from mailing lists.

 -Original Message-
 From: Hank Statscewich
 Sent: Thursday, May 06, 2004 7:13 PM
 To: Harig, Mark
 cc: [EMAIL PROTECTED]
 Subject: RE: CRON problems
 
 
 Quoting Harig, Mark [EMAIL PROTECTED]:

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



Re: CRON problems

2004-05-07 Thread Andrew DeFaria
Brian Dessent wrote:

Andrew DeFaria wrote:

# Install cron service:
cygrunsrv -I cron -p /usr/sbin/cron -a -D -d Cygwin cron -e
[EMAIL PROTECTED] -e CYGWIN=ntsec
^^

As an aside, hasn't 'ntsec' been enabled by default for a long time7 
now? Or am I just remembering incorrectly?
Not sure. I believe I developed this script either before it was or I 
simply didn't know for sure to I stuck it in.

I would also remove the MAILTO... @Salira.com.. :-)

--
Budget: A method for going broke methodically.
--
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/


RE: CRON problems

2004-05-07 Thread Igor Pechtchanski
On Fri, 7 May 2004, Harig, Mark wrote:

  Two places to look for the actual error are /var/log/cron.log and the
  Windows event log.  Perhaps Mark can add this to the output of his
  script...
Igor

 I assume that what you are suggesting is that some
 text pointing the user to /var/log/cron.log be added,
 not actually displaying the log file.  Is this correct?

Absolutely.  Sorry I wasn't clearer.
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster.  -- Patrick Naughton

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



Re: CRON problems

2004-05-07 Thread Andrew DeFaria
Igor Pechtchanski wrote:

On Fri, 7 May 2004, Brian Dessent wrote:

Andrew DeFaria wrote:

# Install cron service:
cygrunsrv -I cron -p /usr/sbin/cron -a -D -d Cygwin cron -e 
[EMAIL PROTECTED] -e CYGWIN=ntsec
^^
As an aside, hasn't 'ntsec' been enabled by default for a long time
now? Or am I just remembering incorrectly?
Brian


You are remembering correctly -- ntsec was enabled by default back 
in the 1.3.* days. That makes the above redundant but harmless. Having 
ntsec in your $CYGWIN also serves as reminder/documentation for the 
actual option values (even if they are the default).
CYGWIN=ntsec is not the default for inetd --install-as-service. Perhaps 
it should be... Then again, perhaps --install-as-service should be 
removed and users instructed to use cygrunsrv instead...
--
What's another word for thesaurus?

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


Re: CRON problems

2004-05-07 Thread Igor Pechtchanski
On Fri, 7 May 2004, Andrew DeFaria wrote:

 Igor Pechtchanski wrote:

  On Fri, 7 May 2004, Brian Dessent wrote:
 
  Andrew DeFaria wrote:
 
  # Install cron service:
  cygrunsrv -I cron -p /usr/sbin/cron -a -D -d Cygwin cron -e [EMAIL 
  PROTECTED] -e CYGWIN=ntsec

^^
  As an aside, hasn't 'ntsec' been enabled by default for a long time
  now? Or am I just remembering incorrectly?
 
  Brian
 
  You are remembering correctly -- ntsec was enabled by default back
  in the 1.3.* days. That makes the above redundant but harmless. Having
  ntsec in your $CYGWIN also serves as reminder/documentation for the
  actual option values (even if they are the default).

 CYGWIN=ntsec is not the default for inetd --install-as-service. Perhaps
 it should be...

Huh?  Do you mean inetd --install-as-service actually puts nontsec in
$CYGWIN?  Otherwise, if ntsec is not specified, it's on (which is what
Brian said, too).

 Then again, perhaps --install-as-service should be removed and users
 instructed to use cygrunsrv instead...

That's the maintainer's choice.
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster.  -- Patrick Naughton

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



Re: CRON problems

2004-05-07 Thread Andrew DeFaria
Igor Pechtchanski wrote:

On Fri, 7 May 2004, Andrew DeFaria wrote:

Igor Pechtchanski wrote:

On Fri, 7 May 2004, Brian Dessent wrote:

Andrew DeFaria wrote:

# Install cron service:
cygrunsrv -I cron -p /usr/sbin/cron -a -D -d Cygwin cron -e 
[EMAIL PROTECTED] -e CYGWIN=ntsec
^^
As an aside, hasn't 'ntsec' been enabled by default for a long time
now? Or am I just remembering incorrectly?
Brian
You are remembering correctly -- ntsec was enabled by default back
in the 1.3.* days. That makes the above redundant but harmless. Having
ntsec in your $CYGWIN also serves as reminder/documentation for the
actual option values (even if they are the default).
CYGWIN=ntsec is not the default for inetd --install-as-service. Perhaps
it should be...


Huh? Do you mean inetd --install-as-service actually puts nontsec in
$CYGWIN? Otherwise, if ntsec is not specified, it's on (which is what
Brian said, too).
Actually I guess you are right - but I have not tested it. Back when I 
first started dealing with inetd and using --install-as-service ntsec 
was not the default.

In any event, some people might want to have not only ntsec but also 
smbntsec set in the CYGWIN environement variable for things like services.
--
Proofread carefully to see if you any words out.

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


Re: CRON problems

2004-05-06 Thread Andrew DeFaria
Brian Dessent wrote:

Hank Statscewich wrote:

Great suggestion. In /var/log/cron.log there were 17 lines of:
/usr/sbin/cron: can't open or create /var/run/cron.pid: Permission denied
So I just changed permission of the file to 777 and cron started up 
just fine.
I rebooted and lo and behold cron is still running. I'm changing 
permission
back to something more appropriate now. I am now a fully satisfied 
cygwin user.
Thansk for such a great port of linux onto windows, Cygwin is the 
best of both
worlds (at least for now :)


Hmm, seems to me like checking ownership and permissions of cron.pid 
would be something the cron_diagnose.sh should do. What happened was 
that you ran it initially as your normal user account, and the pid 
file was created. Then when you tried to start it as a service, it was 
running as the SYSTEM account which didn't have permissions to 
overwrite the file. The solution would be to either just remove it and 
let cron recreate it, or chown SYSTEM:SYSTEM /var/run/cron.pid. Then 
you could give it more restrictive permissions than 777, perhaps 640 
or 600.
You should also check the ownership/permissions of /var/cron* and 
/var/log/cron.log. When I setup cron I normally do:

# Make sure that certain directories and files do not exist! This is to let
# cron create them, which appears to be the only way to get these created
# correctly!
if [ ! -d /var/cron ]; then
 rm -rf /var/cron
 rm -rf /var/run/cron.pid
 rm -rf /var/log/cron.log
 # Install cron service:
 cygrunsrv -I cron -p /usr/sbin/cron -a -D -d Cygwin cron -e 
[EMAIL PROTECTED] -e CYGWIN=ntsec
fi

# Start cron service
cygrunsrv -S cron
--
3 kinds of people: those who can count  those who can't.
--
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/


RE: CRON problems

2004-05-06 Thread Harig, Mark
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 [EMAIL PROTECTED]  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/



RE: CRON problems

2004-05-06 Thread Hank Statscewich
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 PIDPPID TTY STIME COMMAND
  SYSTEM 640   1   ?  21:55:14 /usr/bin/cygrunsrv
  SYSTEM 672 640   ?  21:55:15 /usr/sbin/sshd
   stats1136   1   0  21:55:41 /usr/bin/bash
   stats13801136   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: [EMAIL PROTECTED]
web: www.salmonproject.org



Quoting Harig, Mark [EMAIL PROTECTED]:

 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 [EMAIL PROTECTED]  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/



RE: CRON problems

2004-05-06 Thread Igor Pechtchanski
On Thu, 6 May 2004, Hank Statscewich wrote:

 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 PIDPPID TTY STIME COMMAND
   SYSTEM 640   1   ?  21:55:14 /usr/bin/cygrunsrv
   SYSTEM 672 640   ?  21:55:15 /usr/sbin/sshd
stats1136   1   0  21:55:41 /usr/bin/bash
stats13801136   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,

Two places to look for the actual error are /var/log/cron.log and the
Windows event log.  Perhaps Mark can add this to the output of his
script...
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster.  -- Patrick Naughton

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



RE: CRON problems

2004-05-06 Thread Hank Statscewich
Igor,

Great suggestion. In /var/log/cron.log there were 17 lines of:
/usr/sbin/cron: can't open or create /var/run/cron.pid: Permission denied

So I just changed permission of the file to 777 and cron started up just fine. 
I rebooted and lo and behold cron is still running. I'm changing permission 
back to something more appropriate now. I am now a fully satisfied cygwin user. 
Thansk for such a great port of linux onto windows, Cygwin is the best of both 
worlds (at least for now :)

Hank


Quoting Igor Pechtchanski [EMAIL PROTECTED]:

 On Thu, 6 May 2004, Hank Statscewich wrote:
 
  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 PIDPPID TTY STIME COMMAND
SYSTEM 640   1   ?  21:55:14 /usr/bin/cygrunsrv
SYSTEM 672 640   ?  21:55:15 /usr/sbin/sshd
 stats1136   1   0  21:55:41 /usr/bin/bash
 stats13801136   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,
 
 Two places to look for the actual error are /var/log/cron.log and the
 Windows event log.  Perhaps Mark can add this to the output of his
 script...
   Igor
 -- 
   http://cs.nyu.edu/~pechtcha/
   |\  _,,,---,,_  [EMAIL PROTECTED]
 ZZZzz /,`.-'`'-.  ;-;;,_  [EMAIL PROTECTED]
  |,4-  ) )-,_. ,\ (  `'-' Igor Pechtchanski, Ph.D.
 '---''(_/--'  `-'\_) fL   a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!
 
 I have since come to realize that being between your mentor and his route
 to the bathroom is a major career booster.  -- Patrick Naughton
 


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



Re: CRON problems

2004-05-06 Thread Brian Dessent
Hank Statscewich wrote:

 Great suggestion. In /var/log/cron.log there were 17 lines of:
 /usr/sbin/cron: can't open or create /var/run/cron.pid: Permission denied
 
 So I just changed permission of the file to 777 and cron started up just fine.
 I rebooted and lo and behold cron is still running. I'm changing permission
 back to something more appropriate now. I am now a fully satisfied cygwin user.
 Thansk for such a great port of linux onto windows, Cygwin is the best of both
 worlds (at least for now :)

Hmm, seems to me like checking ownership and permissions of cron.pid
would be something the cron_diagnose.sh should do.  What happened was
that you ran it initially as your normal user account, and the pid file
was created.  Then when you tried to start it as a service, it was
running as the SYSTEM account which didn't have permissions to overwrite
the file.  The solution would be to either just remove it and let cron
recreate it, or chown SYSTEM:SYSTEM /var/run/cron.pid.  Then you could
give it more restrictive permissions than 777, perhaps 640 or 600.

Brian

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



Re: cron problems finally resolved

2003-09-26 Thread Igor Pechtchanski
On Fri, 26 Sep 2003, Øyvind Harboe wrote:

 After much knashing of teeth, I've finally figured out
 what made my cron scripts fail:

 In a normal shell, the /usr/bin is in at the front of
 the $PATH.

 When cron runs as a cygrunsrv service /usr/bin is at the
 end of the $PATH.

 In my case, I had a Windows version of tar that being executed
 instead of CygWins tar, but only when run from within cron
 as a service.

 My workaround was to launch the subcript in question via bash:

 bash --login -i -c sh /cygdrive/c/foo/backup.sh


 This is not the first time I've run into $PATH problems between
 Windows and CygWin. Something to look out for.

 Øyvind

Øyvind,

FWIW, you don't have to invoke sh since you're already invoking bash,
i.e., you could change your invocation to

bash --login -i -c cygdrive/c/foo/backup.sh

(or even without a -c)...  Take a look at the -e option to cygrunsrv --
it might help.  Also, the following thread might be of interest:
http://cygwin.com/ml/cygwin/2003-09/msg01633.html.
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster.  -- Patrick Naughton

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



Re: cron problems - no longer functions after changing system date

2003-02-13 Thread Corinna Vinschen
On Wed, Feb 12, 2003 at 04:08:05PM -0600, Jason Waldhelm wrote:
 hello,
 
 I've noticed a problem with the cron service and as of yet, haven't found any 
 posts that echo my problem.  It seems whenever the system date is changed on 
 the computer on which cron is running as a service, the cron daemon stops 
 functioning.  The service itself doesn't appear to stop (Windows 2000 Server 
 reports it as running), but all jobs scheduled to run via cron cease 
 functioning after the date is changed.  I've managed to work around this 
 problem scheduling cron restart jobs via the Windows Task Scheduler, but it 
 is still a nuisance.

It's a known (non-Cygwin specific) problem in Paul Vixie's cron.  The best
help is to keep the machine always sync'd to a reliable time server.

Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Developermailto:[EMAIL PROTECTED]
Red Hat, Inc.

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: Cron Problems

2003-01-22 Thread Elfyn McBratney
 2) How to start cron when starting the computer?  I tried running it as
 a service in cygrunsrv (cygrunsrv -I cron -p /usr/sbin/cron), but failed
 since starting the service always failed (cron : Win32 Process Id =
 0x3F8 : Cygwin Process Id = 0x3F8 : starting service `cron' failed:
 execv: 0, No error.) but the process cron appeared.

Your problem is that your not passing the -D (Do not kill off parent
process; which allows cron to be used by the service manager) option. So you
need to append `-a -D' to your cygrunsrv line when installing cron.

Regards,

Elfyn McBratney
[EMAIL PROTECTED]




--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: Cron Problems

2003-01-22 Thread Wu Yongwei
Thanks.  However, where can I find the options of cron?  Now I only find 
some info in /usr/doc/Cygwin/cron.README, but only in the ChangeLog 
section, which I ignored on the first reading!

And what is the use of the option -a?

Best regards,

Wu Yongwei

--- Original Message from Elfyn McBratney ---

 2) How to start cron when starting the computer?  I tried running it
 as a service in cygrunsrv (cygrunsrv -I cron -p /usr/sbin/cron), but
 failed since starting the service always failed (cron : Win32 Process
 Id = 0x3F8 : Cygwin Process Id = 0x3F8 : starting service `cron'
 failed: execv: 0, No error.) but the process cron appeared.

Your problem is that your not passing the -D (Do not kill off parent
process; which allows cron to be used by the service manager) option. So 
you need to append `-a -D' to your cygrunsrv line when installing cron.

Regards,

Elfyn McBratney


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Cron Problems

2003-01-22 Thread Elfyn McBratney
 Thanks.  However, where can I find the options of cron?  Now I only find
 some info in /usr/doc/Cygwin/cron.README, but only in the ChangeLog
 section, which I ignored on the first reading!

There are only two options you can pass to cron. 1) -D (got the meaning
wrong the last time; Means don't fork) and 2) -x which is a debugging option
which prints out, well, debugging info ;-)

 And what is the use of the option -a?

When I referred to the `-a' option I was talking about cygrunsrv. The `-a'
option  takes the arguments you wish to pass to the executable, cron.exe,
and when the service is started it is started with those arguments. For
example, taken from cron.README:

  $ cygrunsrv -I cron -p /usr/sbin/cron -a -D

Regards,

Elfyn McBratney
[EMAIL PROTECTED]
www.exposure.org.uk




--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/