Leonard Jacobs wrote: > Is there a simple document that explains how to get cron working as a > service under cygwin? > > I have been perusing the list archives and see a consistent set of > questions dealing with the trials and tribulations of using > cron/crontab but cannot locate the basic help and configuration files. > I am familiar with cron on linux, but this version is not particularly > straightforward. > > Can cron run as a conventional Win2K service?
I use the following: #!/bin/bash ################################################################################ # # File: setup_cron # Description: This script sets up Cygwin's cron on the local machine # Author: [EMAIL PROTECTED] # Created: Mon Apr 15 21:37:48 2002 # Language: Bash Shell # Modifications: # # (c) Copyright 2002, [EMAIL PROTECTED], all rights reserved # ################################################################################ me=$(basename $0) # Make sure that certain directories and files do not exist! This is to let # cron create them, which appears to be the only way to get these created # correctly! if [ ! -d /var/cron ]; then rm -rf /var/cron rm -rf /var/run/cron.pid rm -rf /var/log/cron.log # Install cron service: cygrunsrv -I cron -p /usr/sbin/cron -a -D -d "Cygwin cron" -e \ "MAILTO=$USER@<domain>.com" -e "CYGWIN=ntsec" fi # Start cron service cygrunsrv -S cron -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/