I had problems getting cron to run under cygwin. I could crontab -e and install scripts, but they never actually get run.
The first step was to install cygrunsrv, which appears under the admin section of cywin’s setup.exe package list.
A little searching revealed a utility that will check your set up and install crontab for you. Here’s the complete steps I found by runnning this utility repeatedly and researching the errors it reported:
kato@devbox ~$ chmod a+r /etc/passwd kato@devbox ~$ chmod a+r /etc/group kato@devbox ~$ chmod a+x /var kato@devbox ~$ cron_diagnose.sh Do you want to install the cron daemon as a service? (yes/no) yes Enter the value of CYGWIN for the daemon: [ntsec smbntsec] ntsec The service can run either as yourself or under a privileged account. Running as yourself allows better access to network drives, but does not allow to run the crontab of other users. Do you want to the cron daemon to run as yourself? (yes/no) no Running cron_diagnose ... ... no problem found. Do you want to start the cron daemon as a service now? (yes/no) yes OK. The cron daemon is now running. |
In my particular case, I also had to run the following, though take care with these since they replace your /etc/passwd file:
kato@devbox ~$ mkpasswd -l > /etc/passwd kato@devbox ~$ mkgroup -l > /etc/group kato@devbox ~$ mkpasswd -d -u kato >> /etc/passwd |