You are not logged in.

#1 2008-04-17 16:55:11

xdeusx
Member
Registered: 2007-10-15
Posts: 168

The lost cronjob [solved]

A while ago i messed with cron, I ended up adding some entry to it.
So now it's still there and I have no idea how to get rid of it.

/var/log/crond

17-Apr-2008 17:01  unable to exec /usr/sbin/sendmail -t, user -oem, output to sink null17-Apr-2008 18:01  FILE /var/spool/cron/root USER root pid 19899 cmd /usr/sbin/run-cron /etc/cron.hourly

/var/spool/cron/root

#
# DO NOT EDIT THIS FILE MANUALLY!! USE crontab -e INSTEAD.
#

# <minute> <hour> <day> <month> <dow> <command>


01 * * * *  /usr/sbin/run-cron /etc/cron.hourly
02 00 * * * /usr/sbin/run-cron /etc/cron.daily
22 00 * * 0 /usr/sbin/run-cron /etc/cron.weekly
42 00 1 * * /usr/sbin/run-cron /etc/cron.monthly

the one for my user is empty

/etc/cron.*

[deus@laptop cron.hourly]$ ls -la
total 12
drwxr-xr-x  2 root root 4096 2008-04-16 21:10 .
drwxr-xr-x 72 root root 4096 2008-04-17 18:44 ..
-rwxr-xr-x  1 root root   30 2008-04-16 20:36 pacman.sh
[deus@laptop cron.hourly]$ cd ../cron.daily/
[deus@laptop cron.daily]$ ls -la
total 24
drwxr-xr-x  2 root root 4096 2008-02-02 14:30 .
drwxr-xr-x 72 root root 4096 2008-04-17 18:44 ..
-rwxr--r--  1 root root   51 2008-01-08 07:38 logrotate
-rwxr--r--  1 root root   96 2007-11-30 23:04 shadow
-rwxr--r--  1 root root  180 2007-11-15 21:02 updatedb
-rwxr--r--  1 root root  159 2008-01-30 06:52 whatis
[deus@laptop cron.daily]$ cd ../cron.weekly/
[deus@laptop cron.weekly]$ ls -la
total 8
drwxr-xr-x  2 root root 4096 2007-11-15 19:21 .
drwxr-xr-x 72 root root 4096 2008-04-17 18:44 ..
[deus@laptop cron.weekly]$ cd ../cron.monthly/
[deus@laptop cron.monthly]$ ls -la
total 8
drwxr-xr-x  2 root root 4096 2007-11-15 19:21 .
drwxr-xr-x 72 root root 4096 2008-04-17 18:44 ..
[deus@laptop cron.monthly]$ cd ../cron.d
[deus@laptop cron.d]$ ls -la
total 8
drwxr-xr-x  2 root root 4096 2007-11-15 19:21 .
drwxr-xr-x 72 root root 4096 2008-04-17 18:44 ..
[deus@laptop cron.d]$

Any ideas where this entry could be hidden?

Last edited by xdeusx (2008-04-23 15:06:06)

Offline

#2 2008-04-17 17:42:12

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: The lost cronjob [solved]

crontab -r

Offline

#3 2008-04-17 18:37:32

xdeusx
Member
Registered: 2007-10-15
Posts: 168

Re: The lost cronjob [solved]

Stefan Husmann wrote:

crontab -r

[deus@laptop ~]$ crontab -r
crontab V3.2
crontab file <opts>  replace crontab from file
crontab -    <opts>  replace crontab from stdin
crontab -u user      specify user
crontab -l [user]    list crontab for user
crontab -e [user]    edit crontab for user
crontab -d [user]    delete crontab for user
crontab -c dir       specify crontab directory
[deus@laptop ~]$

It seems that it has no effect.

Offline

#4 2008-04-18 07:09:15

rine
Member
From: Germany
Registered: 2008-03-04
Posts: 217

Re: The lost cronjob [solved]

Well the cron.daily directories etc are for anacron. To edit normal cron just do crontab -e (there is a crontab for every user, so try it as normal user and as root).

Offline

#5 2008-04-23 15:05:51

xdeusx
Member
Registered: 2007-10-15
Posts: 168

Re: The lost cronjob [solved]

Well I tried a couple more things and I magically fixed it.
Thanks to both of you.

Offline

#6 2008-04-23 16:06:23

bender02
Member
From: UK
Registered: 2007-02-04
Posts: 1,328

Re: The lost cronjob [solved]

rine wrote:

Well the cron.daily directories etc are for anacron. To edit normal cron just do crontab -e (there is a crontab for every user, so try it as normal user and as root).

If you look at the standard crontab, what it does is that it just runs all the scripts in cron.daily, etc. (Not that it has any effect on the problem discussed here wink

Offline

#7 2008-04-23 19:28:45

rine
Member
From: Germany
Registered: 2008-03-04
Posts: 217

Re: The lost cronjob [solved]

bender02 wrote:
rine wrote:

Well the cron.daily directories etc are for anacron. To edit normal cron just do crontab -e (there is a crontab for every user, so try it as normal user and as root).

If you look at the standard crontab, what it does is that it just runs all the scripts in cron.daily, etc. (Not that it has any effect on the problem discussed here wink

Well but these jobs even run when your computer is off (after you started it of cours wink), no?

Offline

Board footer

Powered by FluxBB