delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/01/18/12:08:09

X-Spam-Check-By: sourceware.org
Date: Wed, 18 Jan 2006 12:07:53 -0500 (EST)
From: Igor Peshansky <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Lst Recv <listrecv AT gmail DOT com>
cc: cygwin AT cygwin DOT com
Subject: Re: Trouble with cron (Attn: base-files maintainer)
In-Reply-To: <11f3a4750601180827u34bcf95ehe26318605620a348@mail.gmail.com>
Message-ID: <Pine.GSO.4.63.0601181154290.20867@access1.cims.nyu.edu>
References: <11f3a4750601180827u34bcf95ehe26318605620a348 AT mail DOT gmail DOT com>
MIME-Version: 1.0
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Wed, 18 Jan 2006, Lst Recv wrote:

> I'm having trouble using cron on cygwin.
>
> I just installed cron using setup.exe.  It didn't create any rc.d files,
> so I started it manually by typing cron at the prompt.  (I'm a member of
> group 0).  Although the cron process is running, it doesn't seem to be
> running my cron job.

Since you're on WinXP, you have two options: run cron from the command
line, or run it as a service.  To install it as a service, please run the
cron-config script.

> Any suggestions on what to do?  My goal is to get the machine to shut
> itself off at a certain time (necessary to stop those late night
> hack-sessions!).

First test it with the "hello world" of crontabs:

* * * * * /usr/bin/date >> /tmp/CRON_DATE 2>&1

There are at least two potential problems with your crontab: no explicit
path to the executable (don't assume the PATH is going to be the same as
the one you have in your shell), and no stdout/stderr redirection (which
means cron will try -- and fail -- to mail you the output).

Also, check out the Windows Event Log for any messages from cron.

> PS Is there a way to change the title of the cygwin window, like I can
> type "title" in a cmd window?

Look at the (commented out) definition of the "settitle()" function in
your .bashrc.  Note that as-is, the definition there is wrong: to be able
to use it, you'll need to change "^[" to the actual Esc character, and
"^G" to the actual Ctrl-G character.  Or use the following definition
(will only work in bash):

function settitle() { echo -ne "\e]2;$@\a\e]1;$@\a"; }

HTH,
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha AT cs DOT nyu DOT edu | igor AT watson DOT ibm DOT com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"

--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019