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: 1.7.0(0.214/5/3) cron service appears to be working, but no results are found


----- Original Message ----- 
From: "Larry W. Virden"
To: "Cygwin"
Sent: Thursday, December 03, 2009 11:05


| --- On Wed, 12/2/09, Pierre A. Humblet <Pierre.Humblet@ieee.org> wrote:
|
|
| >
| > Larry,
| >
| > Everything looks fine to me. Cron runs, reloads the crontab
| > when it changes and execs the
| > commands.
|
| Well, in one sense that is good news - that is, that at least we have things set up 
appropriately.
|
<snip>
|
| I do know that we don't have a sendmail/exim/ssmtp set up in our Cygwin 1.7 environment. 
Normally in a Unix/Linux type environment, cron would email errors to me. In the cron README 
file, I see that what I should be seeing is a cron.log file if there are any errors. I don't 
have a $HOME/cron.log (but maybe HOME isn't defined in the cron environment).
| The readme also mentions /tmp/cron*.log and /tmp/cron*log.err, but I don't have one of those 
either.
|
Right, if you don't install a mailer, cron writes what would be in the mail to a "cron.log" file 
in the HOME directory. HOME is obtained from /etc/password, if not defined in the crontab.

| The readme goes on to mention /etc/cron.d and /etc/crontab but neither of these exist in my 
environment. Should they, and if so, does anyone have any idea what the specifics are for 
creating them? I only see references to their existence in the cron readme.
|
That's optional, don't worry.

<snip>
| However, at one point in time, MKS Toolkit was installed here. For the past few months, an 
installer file remained, but the actual files used for services, etc. were removed. I worked 
with the admin this morning to force the removal of even the installation files today.  About 
the only thing left are a few registry entries the admin said had to do with license info, etc.

I don't think that's relevant.
| >
| > So either the exec fails (unfortunately that is not
| > reported) or some error occurs. Are there
| > any cron related files in /tmp or in the home directory of
| > lwv27 ? If so do they contain useful
| > info?
|
| There do not appear to be any cron related files in /tmp or /home/lwv27.

I think it's a problem with the exec. Here is what you should do to help:
1) Set your crontab to do something very simple (touch /tmp/xxx) every minute (* * * * *)
2) Launch cron, or if already running, wait one minute until it has reloaded the crontab
3) With "ps -a" identify the cron daemon pid
4) In bash, type
    strace -p cron_pid   |   tee strace.txt
Do that at a time where cron is inactive, i.e. away from a minute boundary (use "date").
This will trace cron and its subprocesses, displaying the text on the screen and saving it in 
strace.txt
Output will only appear initially and then every minute.
You may have to be in the Administrators group on your machine to do that. If need be ask
your admin to help.
5) After two cron runs, stop strace
To do that, open another bash window and type "kill -9 cron_pid"

Send me the strace.txt file as an attachment.

Thanks for your help

Pierre


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