public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* RE: (Fwd) Cron oddity
@ 2002-07-26 14:31 Harig, Mark A.
  0 siblings, 0 replies; 8+ messages in thread
From: Harig, Mark A. @ 2002-07-26 14:31 UTC (permalink / raw)
  To: derbyshire, cygwin

The instructions to run /usr/bin/ssmtp-config are in
/usr/doc/Cygwin/ssmtp*.README.

There are three levels of documentation:

   1. /usr/doc/Cygwin/*  -- this contains Cygwin-specific notes.

   2. /usr/doc/*  -- this contains each package's additional notes.

   3. manual ('man') pages and info files -- general user-level
documentation.

> -----Original Message-----
> From: Paul Derbyshire [mailto:derbyshire@globalserve.net]
> Sent: Friday, July 26, 2002 3:38 PM
> To: cygwin@cygwin.com
> Subject: RE: (Fwd) Cron oddity
> 
> 
> On 26 Jul 2002 at 11:36, Harig, Mark A. wrote:
> 
> > 1. Consider installing 'mutt' using setup.exe.
> 
> More installing...*sigh*...The big problem with Windows is that 
> everything is self contained so everything is multi-megabyte 
> bloatware. The big problem with unix is that nothing is self 
> contained so you have to install one thing, find it doesn't work, 
> install something else, install something else... :)
> 
> > 3. If you don't receive mail within 5 minutes (more like 5 seconds),
> >    then you need to troubleshoot your ssmtp and mutt setups.
> >    Read /usr/doc/Cygwin/mutt*, /usr/doc/Cygwin/ssmtp* (for example,
> >    did you run /usr/bin/ssmtp-config?).  Also, see the manual pages
> >    for mutt and ssmtp...
> 
> I did not run /usr./bin/ssmtp-config. I don't recall the ssmtp man 
> page saying I should do so. I'm starting to think the documentation 
> for some components of Cygwin could be improved a touch.
> 
> 
> --
> 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/
> 
> 

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: (Fwd) Cron oddity
  2002-07-26 14:58   ` Andrew DeFaria
@ 2002-07-26 15:07     ` Paul Derbyshire
  0 siblings, 0 replies; 8+ messages in thread
From: Paul Derbyshire @ 2002-07-26 15:07 UTC (permalink / raw)
  To: cygwin

On 26 Jul 2002 at 13:40, Andrew DeFaria wrote:

> Well people are directing you to install tools they are familar with in 
> an attempt to help you with your problem. One can view the Unix way as 
> "well at least you have a choice of what to install - you could install 
> everything!". Also, often with Windows administration you'll find people 
> doing the same thing and asking you to install WSH or the Resource Kit, etc.

I don't recall anything like this happening...:)

> > I did not run /usr./bin/ssmtp-config. I don't recall the ssmtp man 
> > page saying I should do so. I'm starting to think the documentation 
> >  for some components of Cygwin could be improved a touch.
> 
> Try /usr/doc/*! Often there is stuff in there that explains stuff like 
> setting up things. man is more how to use stuff.

OK.

> Anyway, one thought is that cron has a limited view of what it can see 
> on the network. I've heard tell that it can see only global network 
> mount points. What's a global network mount point as opposed to a non 
> global one is beyond me. That question was never answered for me. For 
> example, using UNC pathnames I could access places like my home 
> directory (mounted to my H drive) through cron but now other network 
> places using UNCs. I never figured out how to tell the difference.

I'm not trying to use cron to access stuff on a lan; just to invoke a 
wget process locally. That the wget then makes TCP connections 
shouldn't be relevant here.

In any event, I did get cron sending me mail, and without using mutt 
either. :) I had forgotten to change a MAILTO = "" in the crontab, of 
all things; I'd used that to stop it trying to send mail before, 
since I use dialup that is only intermittently connected and didn't 
want my home directory to be spammed with dead letters from failed 
mail.

This evening I'll diddle the script crontab to go off after a few 
minutes, connect again, and see what the mailbox fairy brings me...

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: (Fwd) Cron oddity
  2002-07-26 14:27 ` Paul Derbyshire
@ 2002-07-26 14:58   ` Andrew DeFaria
  2002-07-26 15:07     ` Paul Derbyshire
  0 siblings, 1 reply; 8+ messages in thread
From: Andrew DeFaria @ 2002-07-26 14:58 UTC (permalink / raw)
  To: cygwin

Paul Derbyshire wrote:

> On 26 Jul 2002 at 11:36, Harig, Mark A. wrote:
>
>> 1. Consider installing 'mutt' using setup.exe.
>
> More installing...*sigh*...The big problem with Windows is that 
> everything is self contained so everything is multi-megabyte 
> bloatware. The big problem with unix is that nothing is self
> contained so you have to install one thing, find it doesn't work, 
> install something else, install something else... :)

Well people are directing you to install tools they are familar with in 
an attempt to help you with your problem. One can view the Unix way as 
"well at least you have a choice of what to install - you could install 
everything!". Also, often with Windows administration you'll find people 
doing the same thing and asking you to install WSH or the Resource Kit, etc.

>> 3. If you don't receive mail within 5 minutes (more like 5 seconds), 
>> then you need to troubleshoot your ssmtp and mutt setups. Read 
>> /usr/doc/Cygwin/mutt*, /usr/doc/Cygwin/ssmtp* (for example, did you 
>> run /usr/bin/ssmtp-config?). Also, see the manual pages for mutt and 
>> ssmtp...
>
> I did not run /usr./bin/ssmtp-config. I don't recall the ssmtp man 
> page saying I should do so. I'm starting to think the documentation 
>  for some components of Cygwin could be improved a touch.

Try /usr/doc/*! Often there is stuff in there that explains stuff like 
setting up things. man is more how to use stuff.

Anyway, one thought is that cron has a limited view of what it can see 
on the network. I've heard tell that it can see only global network 
mount points. What's a global network mount point as opposed to a non 
global one is beyond me. That question was never answered for me. For 
example, using UNC pathnames I could access places like my home 
directory (mounted to my H drive) through cron but now other network 
places using UNCs. I never figured out how to tell the difference.

As was suggested, try simple commands first. Assuming you get those 
working try a script, located in the root directory of your C drive. Did 
it work? If so then try from your original location. Did that work? Is 
that original location a network drive or network place (UNC name?)?

Report your results back here.

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




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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: (Fwd) Cron oddity
  2002-07-26 12:56 Harig, Mark A.
@ 2002-07-26 14:27 ` Paul Derbyshire
  2002-07-26 14:58   ` Andrew DeFaria
  0 siblings, 1 reply; 8+ messages in thread
From: Paul Derbyshire @ 2002-07-26 14:27 UTC (permalink / raw)
  To: cygwin

On 26 Jul 2002 at 11:36, Harig, Mark A. wrote:

> 1. Consider installing 'mutt' using setup.exe.

More installing...*sigh*...The big problem with Windows is that 
everything is self contained so everything is multi-megabyte 
bloatware. The big problem with unix is that nothing is self 
contained so you have to install one thing, find it doesn't work, 
install something else, install something else... :)

> 3. If you don't receive mail within 5 minutes (more like 5 seconds),
>    then you need to troubleshoot your ssmtp and mutt setups.
>    Read /usr/doc/Cygwin/mutt*, /usr/doc/Cygwin/ssmtp* (for example,
>    did you run /usr/bin/ssmtp-config?).  Also, see the manual pages
>    for mutt and ssmtp...

I did not run /usr./bin/ssmtp-config. I don't recall the ssmtp man 
page saying I should do so. I'm starting to think the documentation 
for some components of Cygwin could be improved a touch.


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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: (Fwd) Cron oddity
@ 2002-07-26 12:56 Harig, Mark A.
  2002-07-26 14:27 ` Paul Derbyshire
  0 siblings, 1 reply; 8+ messages in thread
From: Harig, Mark A. @ 2002-07-26 12:56 UTC (permalink / raw)
  To: derbyshire, cygwin

> 
> Well, I installed ssmtp and put entries in the /etc/ssmtp/revaliases 
> file for "root", "daemon", and my userid with this email address and 
> my ISP's SMTP server, and let cron do its thing. No email almost an 
> hour later; the Windows XP event log shows that cron did its thing 
> and (attempted to) launch the script; and there's nothing in the way 
> of error messages there or in /var/log/cron.log. There's also no 
> dead.letter in ~, which would mean it attempted to send the mail and 
> failed. Since it clearly didn't attempt to send the mail and fail, 
> and equally clearly didn't attempt to send the mail and succeed, I 
> can only conclude that it didn't attempt to send the mail at all. Any 
> clue what's going on?
> 

1. Consider installing 'mutt' using setup.exe.


2. Confirm that ssmtp is setup and configured properly
   by sending mail to yourself using mutt:

     $ mutt -s "hello, world" you@youraddress < /dev/null

3. If you don't receive mail within 5 minutes (more like 5 seconds),
   then you need to troubleshoot your ssmtp and mutt setups.
   Read /usr/doc/Cygwin/mutt*, /usr/doc/Cygwin/ssmtp* (for example,
   did you run /usr/bin/ssmtp-config?).  Also, see the manual pages
   for mutt and ssmtp:

      $ man 1 mutt
      $ man 8 ssmtp

4. Once you have mutt and ssmtp setup correctly (that is, once you
   can send mail to yourself reliably), then you can return to
   troubleshooting cron.  You shouldn't need to wait until midnight
   to test cron.  Simply create an entry like the following in your
   crontab:

      * * * * * date
   or

      * * * * * /usr/bin/date

   If everything is setup properly, then you should receive an
   email message every minute with the output of the 'date' program.
   If you don't receive emails, then read 'man 5 crontab'.  Consider
   setting the environment variable "MAILTO=youraddress" in your
   crontab file.



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

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: (Fwd) Cron oddity
  2002-07-25 21:48 Harig, Mark A.
@ 2002-07-26  4:25 ` Paul Derbyshire
  0 siblings, 0 replies; 8+ messages in thread
From: Paul Derbyshire @ 2002-07-26  4:25 UTC (permalink / raw)
  To: cygwin

On 25 Jul 2002 at 18:43, Harig, Mark A. wrote:

> 1. You might try adding "echo" statements throughout your script (have
> them write to a file in /tmp).  This should help you to narrow down
> where the problem is occurring.
> 
> 2. Read the file /usr/doc/Cygwin/cron.README.  Consider downloading and
> installing the 'ssmtp' package and and setting it up to get cron to send
> you email with the output of commands that it runs.  Read the manual
> pages for ssmtp and cron for more details on how to do this: $ man ssmtp
> and   $ man cron.

Well, I installed ssmtp and put entries in the /etc/ssmtp/revaliases 
file for "root", "daemon", and my userid with this email address and 
my ISP's SMTP server, and let cron do its thing. No email almost an 
hour later; the Windows XP event log shows that cron did its thing 
and (attempted to) launch the script; and there's nothing in the way 
of error messages there or in /var/log/cron.log. There's also no 
dead.letter in ~, which would mean it attempted to send the mail and 
failed. Since it clearly didn't attempt to send the mail and fail, 
and equally clearly didn't attempt to send the mail and succeed, I 
can only conclude that it didn't attempt to send the mail at all. Any 
clue what's going on?


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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: (Fwd) Cron oddity
@ 2002-07-25 21:48 Harig, Mark A.
  2002-07-26  4:25 ` Paul Derbyshire
  0 siblings, 1 reply; 8+ messages in thread
From: Harig, Mark A. @ 2002-07-25 21:48 UTC (permalink / raw)
  To: derbyshire, cygwin

1. You might try adding "echo" statements throughout your script (have
them write to a file in /tmp).  This should help you to narrow down
where the problem is occurring.

2. Read the file /usr/doc/Cygwin/cron.README.  Consider downloading and
installing the 'ssmtp' package and and setting it up to get cron to send
you email with the output of commands that it runs.  Read the manual
pages for ssmtp and cron for more details on how to do this: $ man ssmtp
and   $ man cron.


> -----Original Message-----
> From: Paul Derbyshire [mailto:derbyshire@globalserve.net]
> Sent: Thursday, July 25, 2002 5:01 PM
> To: cygwin@cygwin.com
> Subject: (Fwd) Cron oddity
> 
> 
> 
> I installed cygrunsrv and cron and set up a simple crontab to trigger 
> 
> every minute and write the date to a file, as a test. It worked. Then 
> 
> I removed this job and added one to run a script every midnight. It 
> didn't work. No errors appear in the Windows XP event log or in 
> /var/log/cron.log, and both Services and Task Manager show cron to be 
> 
> running, but the script silently fails to run. Changing the job 
> command to a date append to file command makes it work. All I can 
> figure is that cron is in fact working, sort of, but that the script 
> is failing when invoked, or the script interpreter.
> 
> The script wgets a frequently-updated file from a web site; I did 
> write it so it doesn't directly use any environment variables not 
> made available via the crontab. I'm wondering if wget depends on an 
> environment variable. Although it still leaves the question why no 
> error reports are being generated, at least not in the above-
> mentioned obvious places.
> 
> 
> --
> 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/
> 
> 

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* (Fwd) Cron oddity
@ 2002-07-25 15:55 Paul Derbyshire
  0 siblings, 0 replies; 8+ messages in thread
From: Paul Derbyshire @ 2002-07-25 15:55 UTC (permalink / raw)
  To: cygwin


I installed cygrunsrv and cron and set up a simple crontab to trigger 

every minute and write the date to a file, as a test. It worked. Then 

I removed this job and added one to run a script every midnight. It 
didn't work. No errors appear in the Windows XP event log or in 
/var/log/cron.log, and both Services and Task Manager show cron to be 

running, but the script silently fails to run. Changing the job 
command to a date append to file command makes it work. All I can 
figure is that cron is in fact working, sort of, but that the script 
is failing when invoked, or the script interpreter.

The script wgets a frequently-updated file from a web site; I did 
write it so it doesn't directly use any environment variables not 
made available via the crontab. I'm wondering if wget depends on an 
environment variable. Although it still leaves the question why no 
error reports are being generated, at least not in the above-
mentioned obvious places.


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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2002-07-26 20:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-26 14:31 (Fwd) Cron oddity Harig, Mark A.
  -- strict thread matches above, loose matches on Subject: below --
2002-07-26 12:56 Harig, Mark A.
2002-07-26 14:27 ` Paul Derbyshire
2002-07-26 14:58   ` Andrew DeFaria
2002-07-26 15:07     ` Paul Derbyshire
2002-07-25 21:48 Harig, Mark A.
2002-07-26  4:25 ` Paul Derbyshire
2002-07-25 15:55 Paul Derbyshire

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).