Tuesday, October 27, 2009

Running cron in cygwin

I setup my cron job in cygwin today. The correct way to start the cron
daemon is using the /usr/bin/cron-config tool that comes with the cron
package. You can choose to run cron daemon with you own user account
or as a SYSTEM account process. The difference is explained in
/usr/share/doc/Cygwin/cron-VERSION.README. I chose to run cron
as SYSTEM process. This gave me a bit trouble. Because the job spec
I edited is owned by my own user account. The cron daemon process
cannot load a crobtab file with different owner than its process owner.
(Maybe not correct, but once I change my crontab file to be owned by
SYSTEM, it worked). I got this fixed by using the cronevents.exe tool,
which is really really helpful. Also, you might want to cron_diagnose.sh
script to check if various configuration is correct, such as the /var dir's
permission.

No comments:

Post a Comment