Visit Our UNIX and Linux User Community


*/5 not working in AIX


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting */5 not working in AIX
# 8  
Old 09-11-2009
You could either
- write a wrapper script which only calls your actual script when your time criterium is met
or
- use 3 crontab entries: from 4 30 to 4 55, from 5 00 to 7 55 and from 8 00 to 8 30
Code:
30,35,...,50,55 4 * * * # 4:30 - 4:55
00,05,...,50,55 5-7 * * * # 5:00 - 7:55
00,05,...,25,30 8 * * * # 8:00 - 8:30

# 9  
Old 09-14-2009
Thanks man.. so it cant be done in a single cron entry.. cannot we write a if clause in the cron entry??
# 10  
Old 09-14-2009
We can. Thats more or less my wrapper script approach (without the script).
# 11  
Old 09-14-2009
can you explain the wrapper script.. i did not understand that..
# 12  
Old 09-14-2009
Quote:
from 4 30 - 8 30 for every 5 minutes..
not exactly pretty but it should work.

Code:
30,35,40,45,50,55 4 * * * /your/job/foo.ksh
0,5,10,15,20,25,30,35,40,45,50,55 5 * * * /your/job/foo.ksh
0,5,10,15,20,25,30,35,40,45,50,55 6 * * * /your/job/foo.ksh
0,5,10,15,20,25,30,35,40,45,50,55 7 * * * /your/job/foo.ksh
0,5,10,15,20,25,30 8 * * * /your/job/foo.ksh

or what cero suggested.
Code:
30,35,40,45,50,55 4 * * * /your/job/foo.ksh
0,5,10,15,20,25,30,35,40,45,50,55 5-7 * * * /your/job/foo.ksh
0,5,10,15,20,25,30 8 * * * /your/job/foo.ksh


Last edited by frank_rizzo; 09-14-2009 at 01:10 PM.. Reason: added a shorter version

Previous Thread | Next Thread
Test Your Knowledge in Computers #587
Difficulty: Medium
All programming languages support recursion.
True or False?

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

AIX 4.3 - Need help - Printers not working

I am running an old IBM P-Series server running AIX 4.3 (I know a dinosaur). The OS has not been updated. We had a hard drive failure last weekend, and I was able to get most of the system back up, however, I have 3 line printers and 3 label printers that I can not get working. I have tried... (2 Replies)
Discussion started by: Patrick.Crocker
2 Replies

2. Shell Programming and Scripting

Syntax Error in AIX but working in UX

MENU_INTRO(){ date="`date`" HOSTNAME="`hostname`" if ; then cols=$2 else cols=2 fi clear now=`date +%A,%B-%d-%Y@%H:%M:%S` echo " -: INFORMIX DBA MENU :- " echo... (1 Reply)
Discussion started by: fedora132010
1 Replies

3. Shell Programming and Scripting

Find command not working on AIX

Hello, I am running find command in an AIX Server to find last 7 days modified directories/files. >cd /usr/openv/netbackup/db/class >ls -l total 0 drwxr-xr-x 3 root system 256 May 28 2014 Catalog-Backup drwxr-xr-x 3 root system 256 Sep 18 2012 ... (4 Replies)
Discussion started by: rahul2662
4 Replies

4. UNIX for Dummies Questions & Answers

Ssh stopped working AIX

I Was able to ssh into the AIX box. now i cannot When I run the command to start it it comes back that is was started, but still does not work. Here is a shot i what i see # server:/> lslpp -l | grep ssh openssh.base.client 4.3.0.5201 COMMITTED Open Secure Shell Commands ... (2 Replies)
Discussion started by: fierfek
2 Replies

5. AIX

rssh not working in AIX 6.1

edit by bakunin: double post SNIPped. Hi, I have a similar problem with my AIX 6.1. In AIX 5.3, I have successfully implemented rssh for the caging of my SFTP users. Since we just upgraded to AIX 6.1 TL6 SP7, the rssh does not work. The SFTP works when the user's shell is set to ksh, but... (1 Reply)
Discussion started by: eddie.lee
1 Replies

6. UNIX for Advanced & Expert Users

rm -rf not working on AIX 6.1

Hi Guys, I have never seen this happen before, but created a directory as a user when installing some software, software install fails so I try and remove the directory as root and get an error. There is no processes using the folder see output: ls -l total 446336 -rwxr----- 1 u0008862... (2 Replies)
Discussion started by: chris5126
2 Replies

7. AIX

suid not working on AIX ?

Hello, I'm running AIX 6.1 box. I tried to use suid on binary file but it doesn't work. (I set suid on /usr/bin/sleep and tried to run it as user1(sleep owner is bin) - and program still runs as user1. It shoud run as bin isn't it ? - This test run as expected on Linux box) Filesystem is... (3 Replies)
Discussion started by: vilius
3 Replies

8. AIX

HACMP 5.4 with AIX 5300-10 not working

I have two IBM_9110-51A boxes OS - fresh installs 5764-G03 TL 5300-10-00 disks dated 5/2009 HACMP - fresh installs HACMP for AIX 5L Base V5.4 5765-F62 dated 7/2006 Bottom line for smit output attempting 2 node cluster config ... (2 Replies)
Discussion started by: DrKillPatient
2 Replies

9. AIX

prtconf command not working in Aix 5.3

put prtconf command,after show this error message: bash-3.00# prtconf /usr/sbin/prtconf: msize=msize + 12544^J12544: syntax error pleae help me...........waiting for replay by mohan.s Aix sysadmin (deleted email, rule violation) (2 Replies)
Discussion started by: smohan62
2 Replies

10. AIX

^P Not working on AIX.

I'm working on an AIX box, and I generall prefer emacs command line editing in ksh. Most control-commands are working, except not control-P (Recall previous command). ksh set - o emacs ^p Does not result in the expected outcome. does anyone know why this might be? (0 Replies)
Discussion started by: akbar
0 Replies

Featured Tech Videos