Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Mystery cron job [Solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
big_D
n00b
n00b


Joined: 14 Apr 2005
Posts: 40
Location: UK

PostPosted: Sat Oct 28, 2006 10:28 am    Post subject: Mystery cron job [Solved] Reply with quote

Hello, I'm very confused about a failed cron job which keeps showing up in dead.letter.

Some time ago I set up a job which downloaded some rss feeds for display on the desktop. Just a simple shell script. I removed it some time ago however, and cron is still trying to call the script.

My problem is that I cannot find where this script is called. I've looked through /etc/crontab /etc/cron.daily and the rest - is there anywhere else I might have missed?

Thanks,

D


Last edited by big_D on Sat Oct 28, 2006 5:14 pm; edited 1 time in total
Back to top
View user's profile Send private message
tobr
Guru
Guru


Joined: 29 May 2006
Posts: 330

PostPosted: Sat Oct 28, 2006 11:31 am    Post subject: Reply with quote

If you are using another cron than vixie-cron, it could help to reload the crontab (e.g. fcron doesn't so this automatically)
Back to top
View user's profile Send private message
big_D
n00b
n00b


Joined: 14 Apr 2005
Posts: 40
Location: UK

PostPosted: Sat Oct 28, 2006 12:12 pm    Post subject: Reply with quote

I'm using vixie-cron, so I don't think it's that.
Back to top
View user's profile Send private message
Janne Pikkarainen
Veteran
Veteran


Joined: 29 Jul 2003
Posts: 1143
Location: Helsinki, Finland

PostPosted: Sat Oct 28, 2006 12:39 pm    Post subject: Reply with quote

Try crontab -l (not as root, but as your user account). If the script shows up there, then just crontab -e, remove the line, save and off you go!
_________________
Yes, I'm the man. Now it's your turn to decide if I meant "Yes, I'm the male." or "Yes, I am the Unix Manual Page.".
Back to top
View user's profile Send private message
big_D
n00b
n00b


Joined: 14 Apr 2005
Posts: 40
Location: UK

PostPosted: Sat Oct 28, 2006 12:45 pm    Post subject: Reply with quote

Code:
-bash: /usr/bin/crontab: Permission denied


?? I think I may have had it running as root. Could it be something other than cron?
Back to top
View user's profile Send private message
Janne Pikkarainen
Veteran
Veteran


Joined: 29 Jul 2003
Posts: 1143
Location: Helsinki, Finland

PostPosted: Sat Oct 28, 2006 12:57 pm    Post subject: Reply with quote

Try then crontab -l as root :-)

Also your desktop environment might start applications during logon (for example, in KDE you can put scripts/apps to ~/.kde/Autostart directory), but if the caller is definitely cron, then that is not the case.
_________________
Yes, I'm the man. Now it's your turn to decide if I meant "Yes, I'm the male." or "Yes, I am the Unix Manual Page.".
Back to top
View user's profile Send private message
big_D
n00b
n00b


Joined: 14 Apr 2005
Posts: 40
Location: UK

PostPosted: Sat Oct 28, 2006 2:46 pm    Post subject: Reply with quote

Sorry, I forgot to mention that I already had:

Code:
no crontab for root
Back to top
View user's profile Send private message
Janne Pikkarainen
Veteran
Veteran


Joined: 29 Jul 2003
Posts: 1143
Location: Helsinki, Finland

PostPosted: Sat Oct 28, 2006 3:38 pm    Post subject: Reply with quote

And /etc/crontab doesn't have any new entries which would include stuff from some other directory? Yes, I'm aware you did already check /etc/crontab, but this kind of stuff has bitten me in the past, too, and I only spotted the real reason after couple of tries. ;)

Also could you paste here the relevant lines from cron log?
_________________
Yes, I'm the man. Now it's your turn to decide if I meant "Yes, I'm the male." or "Yes, I am the Unix Manual Page.".
Back to top
View user's profile Send private message
big_D
n00b
n00b


Joined: 14 Apr 2005
Posts: 40
Location: UK

PostPosted: Sat Oct 28, 2006 5:14 pm    Post subject: Reply with quote

A-Ha!

Fixed it. Although my user account didn't have permission to run crontab, I found a crontab file in /var/spool/cron/crontabs corresponding to the user name. Obiously I wasn't looking hard enough during my previous searches.

Thanks for your help! For future reference, where would I find the cron log? I couldn't find it whilst I was looking about the system.
Back to top
View user's profile Send private message
Janne Pikkarainen
Veteran
Veteran


Joined: 29 Jul 2003
Posts: 1143
Location: Helsinki, Finland

PostPosted: Sat Oct 28, 2006 5:56 pm    Post subject: Reply with quote

Well, the cron log position depends on which syslog daemon you use and how is it configured. It can be anything from /var/log/cron.log to /var/log/messages or /var/log/syslog - grep cron /var/log/*.log should help you to find cron lines.
_________________
Yes, I'm the man. Now it's your turn to decide if I meant "Yes, I'm the male." or "Yes, I am the Unix Manual Page.".
Back to top
View user's profile Send private message
big_D
n00b
n00b


Joined: 14 Apr 2005
Posts: 40
Location: UK

PostPosted: Sun Oct 29, 2006 5:57 pm    Post subject: Reply with quote

Got it. Thanks again.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum