How do I get cron working under Cygwin?

PC Support pcsupport@purpleshift.net
Thu Nov 23 17:39:00 GMT 2006


I am trying to get cron running under cygwin on Windows XP.  I have 
installed cron and cygrunsrv, checked all the permissions on every file 
and every directory related to cron (changed a+rwx on everything just 
for kicks) and I have run the following but cron still does not work:

---
#!/usr/bin/bash
cygrunsrv --stop cron
cygrunsrv -E cron
cygrunsrv -R cron
cygrunsrv -I cron -p /usr/sbin/cron -a -D -e "CYGWIN=tty ntsec"
cygrunsrv -S cron
crontab -e

---
I have a windows AND bash shell env var "CYGWIN" set to "ntsec".

I have run cron_diagnose.sh and it found no problems.
--

The message I am getting from WinXP Event Viewer for Applications is:

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 9004: (<user>) MAIL (mailed 39 
bytes of output but got status 0x0001
).

---
I have googled the problem and done everything in every news group known 
in the free world to try and get this running and am still at a loss.  
After four hours of trying everything I know, it is still not running.

--
I have also run cron-config manually.  I do not have sendmail installed 
but otherwise it reports that there are no problems with the setup.

---
I have read /usr/share/doc/Cygwin/cron.README

---
The bash script that I have in /etc/cron.d/cron.daily runs just fine 
when run manually from the command line.
All cron related directories (and parent directories) and files have 
a+rwx set.

---
 From the cron.README
In case of problem, examine the log file for cron,
/var/log/cron.log, and the Windows event log
for information about the problem cron is having.

If you cannot fix the problem, then report it to cygwin@cygwin.com.
Please include a copy of your crontab, ('crontab -l')
and the output of 'cygcheck -srv > cygcheck.txt'.

---
Any ideas?

---

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: crontab
URL: <http://cygwin.com/pipermail/cygwin/attachments/20061123/46cb155f/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cygcheck.txt
URL: <http://cygwin.com/pipermail/cygwin/attachments/20061123/46cb155f/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cron_diagnose.out.txt
URL: <http://cygwin.com/pipermail/cygwin/attachments/20061123/46cb155f/attachment-0001.txt>
-------------- next part --------------
--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


More information about the Cygwin mailing list