This is the mail archive of the
mailing list for the Cygwin project.
Re: Help : can not get cron work
- From: "lin q" <linq936 at hotmail dot com>
- To: cygwin at cygwin dot com
- Date: Thu, 05 Jan 2006 15:12:09 -0700
- Subject: Re: Help : can not get cron work
From: Igor Peshansky <email@example.com>
To: lin q <firstname.lastname@example.org>
Subject: Re: Help : can not get cron work
Date: Thu, 5 Jan 2006 14:23:06 -0500 (EST)
On Thu, 5 Jan 2006, lin q wrote:
> From: Brian Dessent <brian@XXXXXXX.XXX>
> Reply-To: cygwin@XXXXXX.XXX
> To: cygwin@XXXXXX.XXX
> Subject: Re: Help : can not get cron work
> Date: Wed, 04 Jan 2006 18:00:46 -0800
> lin q wrote:
> > 1) "cygrunsrv -I cron -p /usr/sbin/cron -a ?D"
> You should run /usr/bin/cron-config, and not try to do this by hand
> because there is much more to do than just installing the service.
> > 16 10 * * * linq rsync -azv emperor:/dev/tools/*
> That is not the proper format of a user's crontab line. There is no
> such "username" field as the fifth field in a user's crontab, it
> should just be "16 10 * * * rsync ...". It was trying to execute a
> command named "linq" that does not exist, and there should be errors
> to this effect in the Windows Event Log. See "man 5 crontab".
Yep, I missed that...
> Also realize that if you do not have system-wise mounts and Cygwin in
> the PATH the above will not work. This would have been evident if you
> attached the cygcheck output as requested in
OK, I re-installed cron using /usr/bin/cron-config and I corrected
crontab by removing that "linq".
It still does not work.
I tried a Hello Wold test with the following crontab line,
* * * * * /bin/date > /tmp/date.out 2>&1
It works fine.
Now I come to suspect something of Cygwin setup. But I can not see
anything wrong in log file of cygcheck. I attach the file.
One thing to note, when I run cygcheck, it exits with an error,
> cygcheck -svr > /tmp/cygcheck.log
cygcheck: dump_sysinfo: GetVolumeInformation() failed: 1231
Is this a problem?
Nope. Error 1231 means "The network location cannot be reached.". Must
be a network drive.
Another thing, I checked the Windows event loger and I see some
"Information" on crontab, here is the dump out:
The description for Event ID ( 0 ) in Source ( /usr/sbin/cron ) cannot
be found. The local computer may not have the necessary registry
information or message DLL files to display messages from a remote
computer. You may be able to use the /AUXSOURCE= flag to retrieve this
description; see Help and Support for details. The following information
is part of the event:
This is just junk that the Event Viewer adds when it doesn't know how to
parse the event data. You can safely ignore it.
/usr/sbin/cron : PID 6064 : (linq) CMD (rsync -azv
And this is just cron informing you exactly which job it was trying to
Do you understand what it is about?
Looking at the cron job, there could be a few possibilities for failure:
cron doesn't find rsync; the wildcard gets expanded too early; rsync has
output that cron doesn't know where to send because you don't have an smtp
daemon running... At least your mounts look ok. Try eliminating the
possibilities above by fixing your cron job...
I did some correction, now here is my crontab:
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.4232 installed on Thu Jan 5 15:02:10 2006)
# (Cron version -- $Id: crontab.c,v 1.8 2004/12/21 16:14:41 corinna Exp $)
* * * * * /usr/bin/rsync -azv emperor:/devl/swtools c:/bin/swtools
Again I tested that the command, "/usr/bin/rsync -azv emperor:/devl/swtools
c:/bin/swtools" works fine if I type it on shell.
I still can not make it work.
The last suggestion you give is about smtp daemon, I do not quite
understand. Could you elabrate on that?
One last thing, /var/log/cron.log only says " cron started". I wonder
where I can get more data on how on the earch the command is run.
Express yourself instantly with MSN Messenger! Download today - it's FREE!
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html