Operating System - HP-UX
1847456 Members
3568 Online
110265 Solutions
New Discussion

another question regarding cronjobs

 
SOLVED
Go to solution
Kerilyn O'Donnell
Contributor

another question regarding cronjobs

We have a system and it seems that a cronjob that e-mails me every morning with results has been erased (which is fine). But I still receive the pages everyday - when I do a crontab -l -> this cron is not in the output, and when I do a # grep -i parse* /var/spool/cron/crontabs/*

it doesn't show up in any of the crons in the system either.

I'm confused - I have since dropped all the crons and readded them but I'm wondering how this could happen?
5 REPLIES 5
Ian Dennison_1
Honored Contributor
Solution

Re: another question regarding cronjobs

What does 'grep parse /var/adm/cron/log' give you?

Perhaps the Email is being sent from another server, or being resent from UNIX?

Cheers, Ian Dennison
Building a dumber user
Steve Steel
Honored Contributor

Re: another question regarding cronjobs

Hi


Look in the /var/adm/cron/log

Also try at -l and see if it is running like that.

If the command still exists then it may be being called by something else which is in cron.

try and get a process list when the job runs.

If phantom job is a script put
ps -ef|sort -n > /tmp/ps in the script


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Ian Dennison_1
Honored Contributor

Re: another question regarding cronjobs

Aha! Light Bulb!

Were the crontabs actually editted via 'crontab -e', or the crontab file simply removed?

Had an occurence where a sysadmin tried to stop all cron jobs for a User by deleting their crontab. The jobs continued to run, and nothing showed in 'crontab -l'. It was only when we went 'crontab -e' and saved an file with only a comment line in it that the cron jobs stopped running.

We guessed that the result was the crontab was not resubmitted so still remained in memory.

Is this the case here? Cheers, Ian
Building a dumber user
Craig Rants
Honored Contributor

Re: another question regarding cronjobs

Try matching the times of your emails with what is in you cron log. /usr/lib/cron/log has all activity that cron undertakes, if cron sent you something, it would be in there.

GL,
C
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
Sanjay_6
Honored Contributor

Re: another question regarding cronjobs

Hi,

Is it possible this mail is being sent by another cron job belonging to another user. Ckeck the mail log and correcpond that to the cron log. the mail log is found under /var/adm/syslog/mail.log and the cron log is /var/adm/cron/log

Hope this helps.

regds