Operating System - HP-UX
1748179 Members
4255 Online
108758 Solutions
New Discussion юеВ

Re: Cron jobs not executed for specific user

 
SOLVED
Go to solution

Cron jobs not executed for specific user

We have created some crontab jobs for a specific user.
We have noticed that none of them is executed any more as scheduled, whereas as manual commands are successful.

Even simple commands under this user's crontab (eg date) are not executed whereas under another crontab with same group and same shell are successful.

Restarting cron daemon does not have any result and
ps -ef|grep cron
shows
# ps -ef|grep cron
root 13824 13798 0 17:10:25 pts/1 0:00 grep cron
root 16891 1 0 11:35:35 ? 0:01 /usr/sbin/cron

Can you please advice on what the problem can be?
30 REPLIES 30
Kapil Jha
Honored Contributor

Re: Cron jobs not executed for specific user

check in cron log what exacttly is happening.

Second you will have to tell how u scheduled the jobs...
crontab -e or crontab filename

BR,
Kapil+
I am in this small bowl, I wane see the real world......
Michal Kapalka (mikap)
Honored Contributor

Re: Cron jobs not executed for specific user

hi,

you could use su - $user and all your defined crontab scripts could be running under root crontab.

mikap

Re: Cron jobs not executed for specific user

In the cron log commands are referred but in real they are not executed.
In the past everything was working properly.

Is it possible that any cron job of this user is hanged and causes the rest of them not to be executed?
Michal Kapalka (mikap)
Honored Contributor

Re: Cron jobs not executed for specific user

hi,

when you executing the script manually,

under which user and how ??

sh shell_script.sh

mikap
Kanagaraj
Regular Advisor

Re: Cron jobs not executed for specific user

check /usr/lib/cron/cron.allow & cron.deny files are exist or not.

If cron.allow is exist then put the user entry & restart the cron daemon.
Hakki Aydin Ucar
Honored Contributor

Re: Cron jobs not executed for specific user

I agree with D.Kanagaraj, check this out. cron.allow

Re: Cron jobs not executed for specific user

The user is inside cron.allow.

Is it possible that any cron job of this user is hanged and causes the rest of them not to be executed?
Hakki Aydin Ucar
Honored Contributor

Re: Cron jobs not executed for specific user

No , I do not think so that cron jobs will affect others belongs to that user.

You say cron.allow is OK then

What can you see when examine the logs related with your user:

more /var/adm/syslog/syslog.log
more /var/adm/cron.log

OR

cat /var/adm/cron.log | grep -i
Hakki Aydin Ucar
Honored Contributor

Re: Cron jobs not executed for specific user

On second though; for test purpose :

try this with user root if you can afford it ?

and write here what is your exactl line in cronjob ?

crontab -e ?