I’ve been using Cygwin on my Windows partition to run a particular job every minute. Cron (Vixie’s cron) works perfectly, except that messages like this one were appearing (every minute!) in my Windows event log:
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 3248: (ron) CMD (/usr/bin/getmail -q).
This Microsoft KB Bulletin helps explain what the message means generally, but doesn’t help solve it in this case.
So, on a hunch, I started syslogd (which I had installed but never run), restarted cron, et voilà , problem solved.
Now, cron’s informational messages appear /var/log/messages, as they should, and the Windows Event Viewer–bless its little heart–has stopped whining.
(Note: I used syslogd from the Net/inetutils Cygwin package, but syslog-ng from Admin/syslog-ng also seems to solve the problem.)
Here’s a transcript that summarizes how I solved the problem:
14:04:20 !598 ~>cygcheck -cd | grep inetutils inetutils 1.5-4 14:04:22 !598 ~>syslogd-config *** Query: Overwrite existing /etc/syslog.conf file? (yes/no) yes *** Info: Creating default /etc/syslog.conf file *** Warning: The following function requires administrator privileges! *** Query: Do you want to install syslogd as service? (yes/no) yes *** Info: The syslogd service has been installed under the LocalSystem *** Info: account (also known as SYSTEM). To start the service now, call *** Info: `net start syslogd' or `cygrunsrv -S syslogd'. Otherwise, it *** Info: will start automatically after the next reboot. *** Info: Check /etc/syslog.conf first, if it suits your needs. *** Info: Keep in mind that any file mentioned in /etc/syslog.conf *** Info: must exist and be readable and writable for the SYSTEM account. *** Info: Oh and, use tabs, not spaces in /etc/syslog.conf... Configuration finished. Have fun! 14:04:32 !599 ~>cygrunsrv --start syslogd 14:05:04 !600 ~>cygrunsrv --stop cron 14:05:12 !601 ~>cygrunsrv --start cron 14:06:02 !602 ~>tail /var/log/messages Aug 30 14:05:03 blake syslogd: PID 6048: `syslogd' service started Aug 30 14:05:14 blake /usr/sbin/cron: PID 1596: (CRON) STARTUP (V5.0) Aug 30 14:05:15 blake cron: PID 1100: `cron' service started Aug 30 14:06:01 blake /usr/sbin/cron: PID 5792: (ron) CMD (/usr/bin/getmail -q)
I discovered this subtle change when one of my unit tests mysteriously failed once I…
Exception chaining solves two problems in Python 2. 1. Swallowed Exceptions If, while handling exception…
Here's the recording of my talk "15 minutes w/ Beeswax: Safe Password Storage - How…
My presentation from the NYC Python Meetup: Python at Scale; Concurrency at Beeswax. Concurrent Python…
My BazelCon 2019 lightning talk, Python Dependencies The Right Way*, has been posted. Please excuse…
One of my favorite features of Python 3 is f-strings (Formatted String Literals). Each of…
This website uses cookies.
View Comments
One thing to note for syslog-ng (could apply to syslog but 7 years later this package seems gone from cygwin), it require the syslog-ng service be started before cron or other service as sshd to be able to catch logs from those services.
thanks! that did it! :)
Thanks,
My logs were full of rubbish, now they should be lovely and clean....
Well, apart from all the other strange goings on....
It's good to share...
Well, you just rock.
Perfect stuff, and sorted out the last cron problem I had encountered.
Stay awesome.
Sweet guacamole.
This is exactly what i was looking for.
Thanks and keep breathing.
Mucho Thank You. I have been looking for this solution a long time. Every other post I found has the messsage, but the posts and solutions are about other problems.
Clear and just what I was looking for.
Thanks
Thank you Ron for the information on how to get the Windows to stop complaining. I appreciate it.