Results 1 to 5 of 5
ps auxww | grep -i cron yields:
root 3801 0.0 0.0 3412 1032 ? Ss 22:27 0:00 /usr/sbin/cron
tmh 5683 0.0 0.0 3236 820 pts/0 R+ 23:02 0:00 grep -i ...
- 06-09-2009 #1Just Joined!
- Join Date
- Oct 2006
- Posts
- 85
cron does not seem to be working
ps auxww | grep -i cron yields:
root 3801 0.0 0.0 3412 1032 ? Ss 22:27 0:00 /usr/sbin/cron
tmh 5683 0.0 0.0 3236 820 pts/0 R+ 23:02 0:00 grep -i cron
my crontab contains the following:
# m h dom mon dow command
40 4 * * * rdiff-backup /home/tmh/ sin2::/home/tmh/box.home.tmh.backup/
* * * * * echo tootsiya
the log shows the following:
tmh@box:~$ tail /var/log/cron.log
Jun 9 22:57:01 box /USR/SBIN/CRON[5140]: (tmh) CMD (echo tootsiya)
Jun 9 22:58:01 box /USR/SBIN/CRON[5214]: (tmh) CMD (echo tootsiya)
Jun 9 22:59:01 box /USR/SBIN/CRON[5359]: (tmh) CMD (echo tootsiya)
Jun 9 23:00:01 box /USR/SBIN/CRON[5436]: (tmh) CMD (echo tootsiya)
Jun 9 23:01:01 box /USR/SBIN/CRON[5528]: (tmh) CMD (echo tootsiya)
Jun 9 23:02:01 box /USR/SBIN/CRON[5611]: (tmh) CMD (echo tootsiya)
Jun 9 23:03:01 box /USR/SBIN/CRON[5690]: (tmh) CMD (echo tootsiya)
Jun 9 23:03:15 box crontab[5764]: (tmh) BEGIN EDIT (tmh)
Jun 9 23:04:01 box crontab[5764]: (tmh) END EDIT (tmh)
Jun 9 23:04:01 box /USR/SBIN/CRON[5774]: (tmh) CMD (echo tootsiya)
and yet there is no sign that echo is printing anything, nor does the rdiff-log show any activity over the last three days (nights).
- 06-10-2009 #2
X_X, Check your system mail. (use client like mutt,mail)
Cron won't print the outputs on tty.
EDIT: The command is executed in background. so you can't see the output on tty.
just use the command echo something > /dev/tty1
This will print the output on 1st virtual terminal
- 06-10-2009 #3Just Joined!
- Join Date
- Oct 2006
- Posts
- 85
yes, one thing in that it doesn't print things to the terminal, but it also fails to execute rdiff-backup every night. that's the important point.
- 06-10-2009 #4Just Joined!
- Join Date
- Oct 2006
- Posts
- 85
i just realized rdiff-backup requires a password.
how do i get that into my crontab?
- 06-10-2009 #5
Add a cron job using root user.


Reply With Quote