Cygwin - Windows server 2003 - Cron started - Job run - No effect
6lv1
sylvaptik@gmail.com
Wed Oct 26 14:55:00 GMT 2011
Dear Cygwin community,
I'm beating with my self in order to set up a simple cron job in a
Cygwin environment (setup.exe version 2.738) under Windows server
2003. At first I encountered some difficulties to start cron service
but now it starts correctly and cron logs its run my job.
For information, here what I used to set up cron:
net user cron_server --Passwd123_ /add /active:yes /fullname:"Cron
Server" /comment:"Cygwin Cron Server"
net localgroup Administrators cron_server /add
editrights -a SeAssignPrimaryTokenPrivilege -u cron_server
editrights -a SeCreateTokenPrivilege -u cron_server
editrights -a SeIncreaseQuotaPrivilege -u cron_server
editrights -a SeServiceLogonRight -u cron_server
editrights -a SeDenyInteractiveLogonRight -u cron_server
editrights -a SeDenyNetworkLogonRight -u cron_server
editrights -a SeDenyRemoteInteractiveLogonRight -u cron_server
mkpasswd -l -u cron_server >> /etc/passwd
cygrunsrv -I cron -p /usr/sbin/cron -a -n -d "Cygwin cron" -e
"CYGWIN=tty ntsec" -u cron_server -w --Passwd123_
As I said cron starts successfully:
$ net start cron
The Cygwin cron service is starting.
The Cygwin cron service was started successfully.
$ ps -aef | grep cron
cron_ser 4072 1 ? 17:33:39 /usr/bin/cygrunsrv
cron_ser 8860 4072 ? 17:33:39 /usr/sbin/cron
I have installed a job under my current user:
$ crontab.exe -l
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.5GOjQflUK7 installed on Wed Oct 26 17:31:36 2011)
# (Cron version V5.0 -- $Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp $)
* * * * * /bin/date > /tmp/date.log
But I never see /tmp/date.log file:
$ ls -l /tmp
total 0
Here is what I can see in cron events:
$cronevents.exe
[...]
2011/10/26 17:33:39 [cron_server] /usr/sbin/cron: PID 8860: (CRON)
STARTUP (V5.0)
2011/10/26 17:33:40 [cron_server] cron: PID 4072: `cron' service started
2011/10/26 17:34:01 [cron_server] /usr/sbin/cron: PID 8440: (XXXXXX)
CMD (/bin/date > /tmp/date.log)
2011/10/26 17:35:01 [cron_server] /usr/sbin/cron: PID 3984: (XXXXXX)
CMD (/bin/date > /tmp/date.log)
2011/10/26 17:36:01 [cron_server] /usr/sbin/cron: PID 6604: (XXXXXX)
CMD (/bin/date > /tmp/date.log)
2011/10/26 17:37:01 [cron_server] /usr/sbin/cron: PID 9464: (XXXXXX)
CMD (/bin/date > /tmp/date.log)
2011/10/26 17:38:01 [cron_server] /usr/sbin/cron: PID 9780: (XXXXXX)
CMD (/bin/date > /tmp/date.log)
2011/10/26 17:39:01 [cron_server] /usr/sbin/cron: PID 8732: (XXXXXX)
CMD (/bin/date > /tmp/date.log)
2011/10/26 17:40:01 [cron_server] /usr/sbin/cron: PID 3464: (XXXXXX)
CMD (/bin/date > /tmp/date.log)
2011/10/26 17:41:01 [cron_server] /usr/sbin/cron: PID 3492: (XXXXXX)
CMD (/bin/date > /tmp/date.log)
2011/10/26 17:42:01 [cron_server] /usr/sbin/cron: PID 6896: (XXXXXX)
CMD (/bin/date > /tmp/date.log)
2011/10/26 17:42:44 [SGCC.smeras] crontab: PID 4440: (XXXXXX) LIST
(SGCC.smeras)
2011/10/26 17:43:01 [cron_server] /usr/sbin/cron: PID 4964: (XXXXXX)
CMD (/bin/date > /tmp/date.log)
2011/10/26 17:44:01 [cron_server] /usr/sbin/cron: PID 5128: (XXXXXX)
CMD (/bin/date > /tmp/date.log)
Note: I have replace my username by 'XXXXXX'
As you can see cron seems able to run the job but, and I still don't
know why, I cannot see /tpm/date.log file.
Would you have some suggestions ?
I thank you in advance for your help.
Regards.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list