View previous topic :: View next topic |
Author |
Message |
big_D n00b
Joined: 14 Apr 2005 Posts: 40 Location: UK
|
Posted: Sat Oct 28, 2006 10:28 am Post subject: Mystery cron job [Solved] |
|
|
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 |
|
|
tobr Guru
Joined: 29 May 2006 Posts: 330
|
Posted: Sat Oct 28, 2006 11:31 am Post subject: |
|
|
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 |
|
|
big_D n00b
Joined: 14 Apr 2005 Posts: 40 Location: UK
|
Posted: Sat Oct 28, 2006 12:12 pm Post subject: |
|
|
I'm using vixie-cron, so I don't think it's that. |
|
Back to top |
|
|
Janne Pikkarainen Veteran
Joined: 29 Jul 2003 Posts: 1143 Location: Helsinki, Finland
|
Posted: Sat Oct 28, 2006 12:39 pm Post subject: |
|
|
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 |
|
|
big_D n00b
Joined: 14 Apr 2005 Posts: 40 Location: UK
|
Posted: Sat Oct 28, 2006 12:45 pm Post subject: |
|
|
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 |
|
|
Janne Pikkarainen Veteran
Joined: 29 Jul 2003 Posts: 1143 Location: Helsinki, Finland
|
Posted: Sat Oct 28, 2006 12:57 pm Post subject: |
|
|
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 |
|
|
big_D n00b
Joined: 14 Apr 2005 Posts: 40 Location: UK
|
Posted: Sat Oct 28, 2006 2:46 pm Post subject: |
|
|
Sorry, I forgot to mention that I already had:
Code: | no crontab for root |
|
|
Back to top |
|
|
Janne Pikkarainen Veteran
Joined: 29 Jul 2003 Posts: 1143 Location: Helsinki, Finland
|
Posted: Sat Oct 28, 2006 3:38 pm Post subject: |
|
|
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 |
|
|
big_D n00b
Joined: 14 Apr 2005 Posts: 40 Location: UK
|
Posted: Sat Oct 28, 2006 5:14 pm Post subject: |
|
|
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 |
|
|
Janne Pikkarainen Veteran
Joined: 29 Jul 2003 Posts: 1143 Location: Helsinki, Finland
|
Posted: Sat Oct 28, 2006 5:56 pm Post subject: |
|
|
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 |
|
|
big_D n00b
Joined: 14 Apr 2005 Posts: 40 Location: UK
|
Posted: Sun Oct 29, 2006 5:57 pm Post subject: |
|
|
Got it. Thanks again. |
|
Back to top |
|
|
|