Re: Trouble with cron
Also, if there is a simpler way that I should be doing this, please let me know. On 1/18/06, Lst Recv [EMAIL PROTECTED] 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. 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!). PS Is there a way to change the title of the cygwin window, like I can type title in a cmd window? PPS Please CC me on response if you can. (cygcheck -svr included - below are dumps of other mentioned info) $ ps auxw ; ls -l /var/log ; ls -l /etc/rc.d/init.d/ ; /usr/sbin/chkc onfig.exe --list PIDPPIDPGID WINPID TTY UIDSTIME COMMAND 5720 15720 5720 con 1005 11:03:09 /usr/bin/bash 5620 15620 5620? 1005 11:05:39 /usr/sbin/cron 492857204928 4928 con 1005 11:21:19 /usr/bin/bash 430449284928992 con 1005 11:21:19 /usr/bin/ps total 104K -rwxr-x---+ 1 TheGreens Users 67K Jan 18 11:02 setup.log* -rwxr-x---+ 1 TheGreens Users 34K Jan 18 11:02 setup.log.full* -rwx--+ 1 TheGreens None0 Jan 18 11:02 wtmp* total 20K -rwxr-x---+ 1 TheGreens Users 9.1K Nov 10 2002 functions* -rwxr-x---+ 1 TheGreens Users 2.6K Nov 10 2002 sshd* -rwxr-x---+ 1 TheGreens Users 1022 Jun 26 2003 stunnel* sshd0:off 1:off 2:off 3:off 4:off 5:off 6:off stunnel 0:off 1:off 2:off 3:off 4:off 5:off 6:off $ id uid=1005(TheGreens) gid=513(None) groups=0(root),513(None),544(Administrators),5 45(Users) $ crontab -l # DO NOT EDIT THIS FILE - edit the master and reinstall. # (my.cron installed on Wed Jan 18 11:08:19 2006) # (Cron version -- $Id: crontab.c,v 1.8 2004/12/21 16:14:41 corinna Exp $) 0 10 11 * * hibernate now -- 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/
Re: Trouble with cron (Attn: base-files maintainer)
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 21 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;[EMAIL PROTECTED];[EMAIL PROTECTED]; } HTH, Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] | [EMAIL PROTECTED] 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/
Re: Trouble with cron
On Wed, 18 Jan 2006, Igor Peshansky wrote: 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. Forgot to mention that if you run cron from the command line, you'll only be able to execute the crontabs of the user that runs cron. Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] | [EMAIL PROTECTED] 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/