Operating System - HP-UX
1748183 Members
3592 Online
108759 Solutions
New Discussion юеВ

Re: new crontab entries not executing

 
surjeet singh_2
Advisor

new crontab entries not executing

I have included new job in crontab , job is scheduled to execute script once every month , but in some of the servers the job is not executed at all .Can anyone please comment on that ..............Thanks
5 REPLIES 5
Peter Godron
Honored Contributor

Re: new crontab entries not executing

Hi,
crontab -l to list the crontab entries
check the logs for any failures !
restart cron daemon
Regards
Henk Geurts
Esteemed Contributor

Re: new crontab entries not executing

hi Surjeet.

check the servers for
/var/adm/cron/cron.allow and var/adm/cron/cron.deny
make sure at least one of these files is present.
make sure the user is defined in the cron.allow or exluded in the cron.deny.

restart the crondaemon.
/sbin/init.d# ./cron stop;./cron start


regards.
Henk
Thierry Poels_1
Honored Contributor

Re: new crontab entries not executing

hi,

have little info on the issue, so maybe some useless comments:

- use "crontab -e" to edit the crontab, not "vi /var/spool/cron/crontabs/user" which does not refresh the current cron.
- define all your environment variables in your script, remember cron only gives you a naked environment
- check /var/adm/cron/log : did the cron job start, any return codes
- check logfiles or mail (/var/mail/username?) for messages from cron
...

regards,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
Nguyen Anh Tien
Honored Contributor

Re: new crontab entries not executing

You should check these:
1. switch to user you run crontab
#su - user
#crontab -l
if crontab -l display result it means this user is allow to run crontab.
2. Check cron agetn
#ps -ef|grep cron
root 1566 1 0 Jan 26 ? 0:00 /usr/sbin/cron
root 16626 14846 1 15:30:14 pts/td 0:00 grep cron
3. Check crontab log
#vi /var/adm/cron/log.
You will find reason.
HTH
HP is simple
surjeet singh_2
Advisor

Re: new crontab entries not executing

Thanks all of u for quick responce.

surjeet