Cygwin cron: Spurious Messages in Event Viewer
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)
Entries (RSS2)
Thank you Ron for the information on how to get the Windows to stop complaining. I appreciate it.
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
Sweet guacamole.
This is exactly what i was looking for.
Thanks and keep breathing.