Archive for the ‘Cygwin’ Category

Cygwin Crontab not working, Setting up cygwin crontab

Saturday, December 21st, 2013

Problem: Set up the Cygwin crontab on a Windows 7 PC, but now it will not run the crontab entries unless the user is logged into the PC.

Analysis: Windows does not recognize the Cygwin BASH terminal server since it is not part of the Windows environment. In order to have Windows recognize the Cygwin BASH environment the Cygwin crontab needs to be a service on the Windows operating system.

Troubleshooting:
Cygwin Crontab service
1. In Windows 7 right click on Cygwin Terminal and select Run as Administrator
2. In the Cygwin Terminal type cron-config and press enter
3. Do you want to install the cron daemon as a service? (yes/no) yes
4. Enter the value of CYGWIN for the daemon: [] press enter
5. Do you want the cron daemon to run as yourself? (yes/no) no
6. Were the passwords of all cron users saved with “passwd –R”, or are you using the cyglsa package ? (yes/no) yes
7. Do you want to start the cron daemon as a services now? (yes/no) no
8. The Cygwin Terminal should return to a prompt.
9. In a command window on the windows system open services by typing services.msc
10. Right click on Cron daemon and select properties.
11. On the General tab ensure the service is set to start “automatic” and start the service.
12. On the Log On tab select Local System account and click the OK button.

At this point you should be good to run any user’s crontab regardless of whether the user is logged in or not logged into the server or PC. The key is to have the service running automatically and as a Local System account to make it work.