Thursday, February 17, 2011

Cron Configuration of "crontab" on prior Installation of Cygwin (Tested with Windows XP Only)

Hi,
You want to configure crontab on prior installation of cygwin and getting error like :
Error starting service: 1060

You can get rid of the problem by removing the old version cygwin dll (cygwin1.dll) file that can be found in root windows installation directory like C:\WINDOWS\system32 or if  Open ssh is installed then it would be in : C:\Program Files\OpenSSH\bin directory.

To remove this file you need to change permissions of the file :

chmod 777 /cygdrive/c/WINDOWS/system32/cygwin1.dll
don't worry it will change the permission of your cygwin1.dll file only.
Once file permission have updated you can remove this file like :
rm -f /cygdrive/c/WINDOWS/system32/cygwin1.dll
 
now follow the given below steps and your cron is ready to use. 

pawan.singh@pawanksingh ~
$ cron-config
Cron is already installed as a service under account LocalSystem.
Do you want to remove or reinstall it? (yes/no) yes
OK. The cron service was removed.

Do you want to install the cron daemon as a service? (yes/no) yes
Enter the value of CYGWIN for the daemon: [ ] ntsec

You must decide under what account the cron daemon will run.
If you are the only user on this machine, the daemon can run as yourself.
   This gives access to all network drives but only allows you as user.
Otherwise cron should run under the local system account.
  It will be capable of changing to other users without requiring a
  password, using one of the three methods detailed in
  http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-nopasswd1
Do you want the cron daemon to run as yourself? (yes/no) no


Running cron_diagnose ...
WARNING: Your computer does not appear to have a cron table for pawan.singh.
Please generate a cron table for pawan.singh using 'crontab -e'

... 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 case of problem, examine the log file for cron,
/var/log/cron.log, and the Windows event log (using /usr/bin/cronevents)
for information about the problem cron is having.

Examine also any cron.log file in the HOME directory
(or the file specified in MAILTO) and cron related files in /tmp.

If you cannot fix the problem, then report it to cygwin@cygwin.com.
Please run the script /usr/bin/cronbug and ATTACH its output
(the file cronbug.txt) to your e-mail.

WARNING: PATH may be set differently under cron than in interactive shells.
         Names such as "find" and "date" may refer to Windows programs. 


No comments: