public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* 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-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-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 12:56 (Fwd) Cron oddity Harig, Mark A.
2002-07-26 14:27 ` Paul Derbyshire
2002-07-26 14:58   ` Andrew DeFaria
2002-07-26 15:07     ` Paul Derbyshire
  -- strict thread matches above, loose matches on Subject: below --
2002-07-26 14:31 Harig, Mark A.
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).