This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cron


----- Original Message ----- 
From: "Kiran, Shashi" <Shashi.Kiran>
To: <cygwin>
Sent: Wednesday, August 08, 2007 10:40 AM
Subject: cron


Hi,

I 'm trying to schedule a shell script on cygwin using cron. No matter
what
I do I don't seem to get the cron job executing my bash script.

My script is temp.sh

echo `date` > /home/test/temp.log

crontab -e is having the following details

* * * * * sh /home/test/temp.sh > /home/test/temp.sh.err 2>&1

I did use the paths in the script itself and I also used the windows
path
where the cygwin installed(/cygdrive/d/cygwin/).

I also tried using the following by editing the crontab:

* * * * * date > /home/test/date.txt

Still not working. I don't have administrator login. I ran the
cron_diagnose.sh and it din't give me any errors.

Please find the attached cronbug.txt

*********
1- cronbug shows that the cron daemon is running fine as yourself ("test").
2- You are in the Administrators group.
3- You are running interactively in Terminal Service session on a Windows 2003 Server.
   I have never tested that setup, but I see that you have sshd and exim (which is stopped)
   under privileged accounts. Any problem there?
4- Your crontab file has a PATH that does not include the Windows directory,
  which may cause problems (not sure). Removing that line can't hurt.
5- There are no cron entries in the Windows event log. This is strange. Can you verify
    that fact by looking the Windows application event log yourself?
6- /usr/sbin/sendmail  is linked to exim.
  Are there any messages in /var/spool/mail/test or any entries is /var/log/exim/exim_main.log ?

So the only strange things are 5 and (presumably) that there is no /home/test/date.txt
Please look at 6 and 5 for clues and try 4 .

If the sshd server works fine, try to rerun cron-config to not run cron as yourself. It should
then setup cron to run under the sshd_server account.
Let us know...

Pierre



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]