Mail Archives: cygwin/2006/01/18/12:08:09
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 -