I do not have a problem to get cron to start - but it flat doesn't work.
I've started/configured it to start every way I've seen so far (except
the "wrappers") stuff - I don't see how that could help...
I've read a TON of information provided by Ms. Vinschen - and I am
still not able to get cron to execute a crontab entry..
Here is my latest attempt: (all commands entered by user:mark unless
otherwise specified - mark is in group Administrators)
# configure cron Win2003 Server
net user cron_server <passwd> /add /yes
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
mkpasswd -l -u cron_server >> /etc/passwd
--- all these work fine... Then, I did the following...
For security reasons:
editrights -a SeDenyInteractiveLogonRight -u cron_server
editrights -a SeDenyNetworkLogonRight -u cron_server
editrights -a SeDenyRemoteInteractiveLogonRight -u cron_server
--- At this point, no problems...
cygrunsrv -I cron -p /usr/sbin/cron -a -D -u cron_server -w <passwd>
mark@mcspd-a ~
$ net start cron
The cron service is starting.
The cron service could not be started.
The service did not report an error.
More help is available by typing NET HELPMSG 3534.
The "net start cron" failed - so, I did this.
editrights -r SeDenyInteractiveLogonRight -u cron_server
editrights -r SeDenyNetworkLogonRight -u cron_server
editrights -r SeDenyRemoteInteractiveLogonRight -u cron_server
ssh cron_server@localhost (because su doesn't work)
cron_server>cygrunsrv -R cron
cron_server>rm -f /var/run/cron.pid
cron_server>cygrunsrv -I cron -p /usr/sbin/cron -a -D
cron_server>net start cron
The cron service is starting.
The cron service was started successfully.
cron_server>ps -aef
cron_server@mcspd-a ~
$ ps -aef
UID PID PPID TTY STIME COMMAND
sshd_ser 1484 1 ? 20:26:19 /usr/bin/cygrunsrv
sshd_ser 1500 1484 ? 20:26:19 /usr/sbin/sshd
webmon 3624 2240 ? 10:06:04 <defunct>
mark 4768 1 con 20:37:07 /usr/bin/rxvt
mark 4808 4768 1 20:37:07 /usr/bin/bash
webmon 3880 3916 ? 08:16:04 <defunct>
sshd_ser 4720 1500 ? 13:54:05 /usr/sbin/sshd
mark 4416 4720 3 13:54:06 /usr/bin/bash
mark 6056 4416 3 13:59:19 /usr/bin/ssh
sshd_ser 3796 1500 ? 13:59:19 /usr/sbin/sshd
cron_ser 3704 3796 4 13:59:22 /usr/bin/bash
sshd_ser 1792 1500 ? 14:00:24 /usr/sbin/sshd
mark 5460 1792 5 14:00:25 /usr/bin/bash
sshd_ser 4596 1500 ? 17:35:18 /usr/sbin/sshd
mark 5264 4596 7 17:35:19 /usr/bin/bash
mark 868 5460 5 17:37:13 /usr/bin/ssh
sshd_ser 664 1500 ? 17:37:13 /usr/sbin/sshd
Administ 4652 664 6 17:37:16 /usr/bin/bash
SYSTEM 1612 1 ? 18:01:08 /usr/bin/cygrunsrv
SYSTEM 4120 1612 ? 18:01:08 /usr/sbin/cron
cron_ser 5656 3704 4 18:01:38 /usr/bin/ps
cron_server>cron_diagnose.sh
cron_diagnose.sh 1.7
This script did not find any errors in your crontab setup.
cron_server@mcspd-a ~
cron_server>crontab -l
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.5292 installed on Wed Oct 11 18:05:28 2006)
# (Cron version -- $Id: crontab.c,v 1.8 2004/12/21 16:14:41 corinna Exp $)
* * * * * rm ~/this
* * * * * date > /home/cron_server/date.txt
$ ls -la
total 36
drwxrwxrwx+ 4 cron_server None 0 Oct 11 18:05 .
drwxrwxrwx+ 6 mark None 0 Oct 11 13:59 ..
-rwxr-xr-x 1 cron_server None 1150 Aug 28 15:07 .bash_profile
-rwxr-xr-x 1 cron_server None 3116 Aug 28 15:07 .bashrc
-rwxr-xr-x 1 cron_server None 1461 Aug 28 15:07 .inputrc
drwx------+ 2 cron_server None 0 Oct 11 18:04 .ssh
drwxrwxrwx+ 3 cron_server None 0 Oct 11 15:31 WINDOWS
-rw-r--r-- 1 cron_server None 23875 Oct 11 18:03 cygcheck.txt
-rw-r--r-- 1 cron_server None 0 Oct 11 14:16 this
(no date.txt and still see "this")
mark@mcspd-a ~
ls -la /var/cron/tabs/
total 4
drwxrwxrwt+ 2 mark Users 0 Oct 11 17:38 .
drwxrwxrwt+ 3 mark Users 0 Aug 28 15:07 ..
-rw-r----- 1 Administrator root 212 Oct 11 17:38 Administrator
-rw-r----- 1 cron_server SYSTEM 212 Oct 11 14:16 cron_server
-rw-r----- 1 mark root 212 Oct 11 16:06 mark
-rw-r----- 1 webmon root 363 Oct 10 20:27 webmon
$ uname -a
CYGWIN_NT-5.2 mcspd-a 1.5.21(0.156/4/2) 2006-07-30 14:21 i686 Cygwin
the webmon crontab executes a script - it doesn't fire either. All of
these crontabs work on WinXP/Cygwin - and that's w/me (mark) running
cron
On this Win2003 Server SE box - I can get cron to start in a number of
accounts - but it never fires a cron job.
Please help!?
THANKS VERY MUCH in adv!
Mark.