Crontab do not run on PM hours


 
Thread Tools Search this Thread
Operating Systems HP-UX Crontab do not run on PM hours
# 15  
Old 04-12-2012
Please post the output from this command while logged in as root:
It should be about 50 lines long.
Code:
/usr/sbin/sysdef

And this one:
Code:
sar -v 2 10

And the one we asked for earlier:
Code:
ls -lad /var/adm/cron/cron.allow
cat /var/adm/cron/cron.allow

When you posted grep report /usr/adm/cron/log were all the other night time jobs containing the word report missing too?
What's the timestamp on the cron log?:
Code:
ls -lad /usr/adm/cron/log

What Operating System version do you have?
Code:
uname -a

Are you up to date with HP-UX patches?

Last edited by methyl; 04-12-2012 at 10:02 AM..
# 16  
Old 04-12-2012
Code:
NAME                      VALUE       BOOT        MIN-MAX        UNITS   FLAGS
acctresume                    4          -       -100-100                -
acctsuspend                   2          -       -100-100                -
allocate_fs_swapmap           0          -           -                   -
bufpages                 251191          -          0-           Pages   -
create_fastlinks              0          -           -                   -
dbc_max_pct                   6          -           -                   -
dbc_min_pct                   5          -           -                   -
default_disk_ir               0          -           -                   -
dskless_node                  0          -          0-1                  -
eisa_io_estimate            768          -           -                   -
file_pad                     10          -          0-                   -
fs_async                      0          -          0-1                  -
hpux_aes_override             0          -           -                   -
maxdsiz                  262144          -          0-655360     Pages   -
maxdsiz_64bit           2097152          -        256-1048576    Pages   -
maxfiles                   2048          -         30-2048               -
maxfiles_lim               4096          -         30-2048               -
maxssiz                   32768          -          0-655360     Pages   -
maxssiz_64bit            262144          -        256-1048576    Pages   -
maxswapchunks                 0          -          1-16384              -
maxtsiz                   24576          -          0-655360     Pages   -
maxtsiz_64bit            262144          -        256-1048576    Pages   -
maxuprc                    3682          -          3-                   -
maxvgs                       10          -           -                   -
msgmap               -536870911          -          3-                   -
nbuf                     333777          -          0-                   -
nfile                     65536          -         14-                   -
ninode                    34816          -         14-                   -
no_lvm_disks                  0          -           -                   -
nproc                      4200          -         10-                   -
npty                         60          -          1-                   -
nstrpty                      60          -           -                   -
nswapdev                     10          -          1-25                 -
nswapfs                      10          -          1-25                 -
public_shlibs                 1          -           -                   -
remote_nfs_swap               0          -           -                   -
rtsched_numpri               32          -           -                   -
sema                 -536870911          -          0-1                  -
shmem                -536870911          -          0-1                  -
shmmni                      512          -          3-1024               -
streampipes                   0          -          0-                   -
swapmem_on                    1          -           -                   -
swchunk                    2048          -       2048-16384      kBytes  -
timeslice                    10          -         -1-2147483648 Ticks   -
unlockable_mem                0          -          0-           Pages   -
mceldev[298]/ #

Code:
sar -v 2 10
HP-UX mceldev B.11.23 U ia64    04/12/12
14:36:47 text-sz  ov  proc-sz  ov  inod-sz  ov  file-sz  ov
14:36:49   N/A   N/A 627/4200  0  1566/372426 0  3865/65536 0
14:36:51   N/A   N/A 629/4200  0  1567/372426 0  3870/65536 0
14:36:53   N/A   N/A 627/4200  0  1566/372426 0  3865/65536 0
14:36:55   N/A   N/A 626/4200  0  1566/372426 0  3863/65536 0
14:36:57   N/A   N/A 626/4200  0  1566/372426 0  3863/65536 0
14:36:59   N/A   N/A 626/4200  0  1566/372426 0  3863/65536 0
14:37:01   N/A   N/A 629/4200  0  1566/372426 0  3869/65536 0
14:37:03   N/A   N/A 627/4200  0  1566/372426 0  3865/65536 0
14:37:05   N/A   N/A 626/4200  0  1566/372426 0  3863/65536 0
14:37:07   N/A   N/A 627/4200  0  1566/372426 0  3865/65536 0
mceldev[299]/ #

Code:
mceldev[299]/ #ls -lad /var/adm/cron/cron.allow
-rwxr-xr-x   1 bin        bin             46 Nov 29 11:36 /var/adm/cron/cron.allow
mceldev[300]/ #cat /var/adm/cron/cron.allow
root
adm
uucp
bscsmig
ora10g
jmuchang
report
mceldev[301]/ #

and if I do
Code:
grep "report" /var/adm/cron/log

, I see everything , like all entries in the crontab -l

---------- Post updated at 03:09 PM ---------- Previous update was at 03:08 PM ----------

Code:
$ grep "report" /var/adm/cron/log
>  CMD: /home/report/daily_open_amount.ksh > open_amount.log
>  report 20938 c Wed Apr 11 23:59:00 SAST 2012
<  report 20938 c Thu Apr 12 00:02:09 SAST 2012
>  CMD: /home/report/opn_amt_gestores_credito.ksh > opn_amt_gestores_credito.log
>  report 908 c Thu Apr 12 01:00:00 SAST 2012
<  report 908 c Thu Apr 12 01:07:08 SAST 2012
>  CMD: /home/report/duo_subscribers.ksh > duo_subscribers.log
>  report 7746 c Thu Apr 12 02:45:00 SAST 2012
<  report 7746 c Thu Apr 12 03:09:04 SAST 2012
>  CMD: /home/report/postpaid_subscribers.ksh > postpaid_subscribers.log
>  report 11615 c Thu Apr 12 03:45:00 SAST 2012
<  report 11615 c Thu Apr 12 03:49:50 SAST 2012
$

its hp-ux 11.23
# 17  
Old 04-12-2012
In the kernel nproc (maximum processes running on the system) is quite low at 4200 but maxuprc (maximum processes for one user) is high at 3682 . The sar shows that you have some leeway. It's not that.

If cron itself is sick we would expect messages like "queue max run limit reached" in /usr/adm/cron/log or other errors in /usr/adm/syslog/syslog.log and possibly in /var/mail/root .


Because the other jobs for account "report" ran we can eliminate expired password.

This is quite a mystery.



My best guess is that this is a HP-UX Trusted System and the account report has been restricted to certain hours of operation which don't include 13:00 .
# 18  
Old 04-12-2012
Hi

Its not a trusted system, and the user "report" was created using sam, no restriction whatsover!! I have change the entry like
Code:
00 1,13 * * * /home/report/opn_amt_gestores_credito.ksh > opn_amt_gestores_credito.log

and tomorrow at 13:00PM I will check again
# 19  
Old 04-12-2012
Probably a silly question, but did you originally have just the 01:00 definition?
If so, did you use crontab -e to edit the file, or did you just edit the file down /var/spool/cron/....... somewhere?
If you did then the cron deamon will not recognise the update.

A forced clock change with date -u can also confuse cron and you may need to stop/restart it.

If you feel that you should stop/restart it because of either of the above, check in /etc/inittab to see if it has been coded as a respawn process. I have this on AIX, but HP-UX seems to have it started with /sbin/rc2.d/S730cron. You would be best to stop start with this script if this is what you have too. Run it as root:-
Code:
#  sh /sbin/rc2.d/S730cron stop
#  sh /sbin/rc2.d/S730cron start

Of course, if this is not the case, please ignore me.




Robin
Liverpool/Blackburn
UK
# 20  
Old 04-12-2012
initially I had
Code:
00 1,13 * * * /home/report/opn_amt_gestores_credito.ksh > opn_amt_gestores_credito.log

I always use the crontab -e comand

I have not stop/start the cron deamon, because the other entries in the crontab are working fine. So I had no reason to stop/start the deamon using
Code:
/sbin/init.d/cron stop

# 21  
Old 04-12-2012
One more idea, check the crontab file for strange characters or missing linefeed or funny permissions:

Code:
sed -n l /var/spool/cron/crontabs/report

Normal lines will be displayed with a dollar sign to show where the end of line is.
And check permissions on the crontab file (should be 400)
Code:
ls -lad /var/spool/cron/crontabs/report


Ps. In post #1 you posted that you had stop/started the cron daemon, but not how this was done.

Last edited by methyl; 04-12-2012 at 12:18 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Run a command once in three hours

Hi All, I have a bash script which is scheduled to run for every 20 minutes. Inside the bash script, one command which I am using need to be triggered only once in two or three hours.Is there anyway to achieve this. For example, if then echo "hi" else echo "Hello" UNIX Command---once... (5 Replies)
Discussion started by: ginrkf
5 Replies

2. Shell Programming and Scripting

Help 'speeding' up this 'parsing' script - taking 24+ hours to run

Hi, I've written a ksh script that read a file and parse/filter/format each line. The script runs as expected but it runs for 24+ hours for a file that has 2million lines. And sometimes, the input file has 10million lines which means it can be running for more than 2 days and still not finish.... (9 Replies)
Discussion started by: newbie_01
9 Replies

3. Shell Programming and Scripting

Can't get my crontab to run

I'm trying to get a crontab to run, every Friday at 11am and the problem is that it isn't running at all. 0 11 * * 6 /Users/martinb/Documents/SYSADMIN/Regular-Scripts/Info-And-Backups.sh Here's a link to a screenshot of my script (I've censored my email address). Screen Shot 2017 11 03... (3 Replies)
Discussion started by: $shell_Learner
3 Replies

4. Solaris

How to run cron entry every 5 min during office hours only?

Hi I need to setuop a cron entry to run every 5 min, only in office hours (between 8:00AM to 18:00PM, I did the following: 0,5,10,15,20,25,30,35,40,45,50,55 8,9,10,11,12,13,14,15,16,17,18 * * * /home/xxx/zzz.ksh But somehow does not work. Could it be wrong? (8 Replies)
Discussion started by: fretagi
8 Replies

5. Shell Programming and Scripting

Script fails to run properly when run from CRONTAB

Hello all, I'm trying to write a script to gather and send data and it works just fine at the bash command line, but when executing from CRON, it does not run properly. My scripting skills are pretty limited and there's probably a better way, but as I said it works at the command line, but... (12 Replies)
Discussion started by: rusman
12 Replies

6. UNIX for Dummies Questions & Answers

Execute crontab for every 4 hours and begin from current time

I want to add a crontab entry which should execute for every 4 hours and that 4 hours calculation should begin from the current time. Normally if I set the crontab entry like this, 00 */4 30 05 * root date >>/tmp/cronout The above will execute the date command for every 4 hours like... (7 Replies)
Discussion started by: Ganeshwari
7 Replies

7. Solaris

crontab to run every 20 second

Hi experts, I want to set the crontab for my script which will run every 20 seconds I think below could be the possible one- */3 * * * * /export/home/username/scripts/runing.sh As my system(SOLARIS 9) is live- i am confused to implement before make sure !!! I need... (4 Replies)
Discussion started by: thepurple
4 Replies

8. Solaris

How to define every 5 hours in Crontab

Hi Experts, I want to run a script which will move the files from particular directory to another backup directory After EVERY 5 hour. How can I put it in crontab- 5 hours!!! * * * * /home/movefilescritp.sh //purple (8 Replies)
Discussion started by: thepurple
8 Replies

9. Shell Programming and Scripting

How to make a script run for a maximum of "x" number of hours only

How to make a script run for a maximum of "x" number of hours only (7 Replies)
Discussion started by: ScriptDummy
7 Replies

10. UNIX for Dummies Questions & Answers

crontab every 2 minutes, 24 hours and once a week

can someone please check my answers for the crontabs I am making 1. how would I set up a crontab tab executes every 2 minutes each and every day of the week? answer: 2 * * * * /path/to/file.pl <-- is this correct? 2. how would I set up a crontab that executes every 24 hours at 2am?... (6 Replies)
Discussion started by: Bobafart
6 Replies
Login or Register to Ask a Question