crontab every 5 min.


 
Thread Tools Search this Thread
Operating Systems AIX crontab every 5 min.
# 1  
Old 08-22-2012
crontab every 5 min.

Hi running aix 6.1
Code:
oslevel 

6100-07-03-1207

I need to confirm that this cron entry is set properly.

I need it set for every 5 min.

Code:
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /path/to/script.sh

it does not appear that it is running every 5 min but it did in the beginning.
# 2  
Old 08-22-2012
Yes, it is set correctly.

Column info:
1 = min
2 = hour
3 = day of the month
4 = month
5 = weekday (Sun=0)
This User Gave Thanks to kah00na For This Post:
# 3  
Old 08-23-2012
cron log in available on this file: /var/adm/cron/log

Try
Code:
sh -n /path/to/script.sh

to check syntax
# 4  
Old 08-24-2012
Hi ,

Instead of mentioning 0,5,10,.. make it as read by

*/5 * * * * /path/to/script.sh

Try this this will be running every five minutes once Smilie
# 5  
Old 08-24-2012
Ahem...

Quote:
Originally Posted by priyak
*/5 * * * * /path/to/script.sh
This is the AIX forum! What you have suggested works on Linux (more precisely it works with the widely-used Vixie-cron), but not the AIX cron.


From the crontab man page

Quote:
Code:
These fields accept the following values:
minute 	0 through 59
hour 	0 through 23
day_of_month 	1 through 31
month 	1 through 12
weekday 	0 through 6 for Sunday through Saturday
command 	a shell command

You must specify a value for each field. Except for the command field, these fields can contain the following:

    A number in the specified range. To run a command in May, specify 5 in the month field.

    Two numbers separated by a dash to indicate an inclusive range. To run a cron job on Tuesday through Friday,
    place 2-5 in the weekday field.

    A list of numbers separated by commas. To run a command on the first and last day of January, you would specify
    1,31 in the day_of_month field.

    A combination of two numbers separated by a dash to indicate an inclusive range and a list of numbers separated
    by commas can be used in conjunction. To run a command on the first, tenth to sixteenth and last day of January,
    you would specify 1,10-16,31 in the day_of_month field. The above two points can also be used in combination.

    An * (asterisk), meaning all allowed values. To run a job every hour, specify an asterisk in the hour field.


bakunin

Last edited by bakunin; 08-24-2012 at 08:58 AM..
These 2 Users Gave Thanks to bakunin For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Get min and max value in column

Gents, I have a big file file like this. 5100010002 5100010004 5100010006 5100010008 5100010010 5100010012 5102010002 5102010004 5102010006 5102010008 5102010010 5102010012 The file is sorted and I would like to find the min and max value, taking in the consideration key1... (3 Replies)
Discussion started by: jiam912
3 Replies

2. UNIX for Dummies Questions & Answers

Cron every 5 min

Hi, I am trying to run a script in cron every 5 min in SOLARIS 10 When I do5 * * * * /path to fileor*/5 * * * * /path to file Doesn't work. Please let me know what should I put in the cron entry Thanks (2 Replies)
Discussion started by: Rossdba
2 Replies

3. Solaris

min HW requirement for Solaris10?

Dear All I am using Solaris8 on my sun UltraSPARC machine. Can you please let me know what is the minimum HW requirement to install Solaris10g ? Thank you in advance (1 Reply)
Discussion started by: hadimotamedi
1 Replies

4. Shell Programming and Scripting

Get min from a column conditionally

hi, i have a file with folowing content: STORAGE PERCENTAGE FLAG: /storage_01 64% 0 /storage_02 17% 1 /storage_03 10% 0 /storage_04 50% 1 I need to get the value of STORAGE from those with FLAG=0 and which has the min PERCENTAGE i am able to get the STORAGE corresponding to... (8 Replies)
Discussion started by: kichu
8 Replies

5. Shell Programming and Scripting

How to get the counter value incremented after every 1 min?

I want to check the counter value for every 1 min until the particular counter value is reached and it should exit. Counter value: 15.( For Example) counter = 1 The start time is noted using Localtime. How can i do this in perl? Regards Archana (1 Reply)
Discussion started by: vanitham
1 Replies

6. Shell Programming and Scripting

grep for last 15 min of log

I need help trying to grep for a error in log file for only last 15 min. example under /var/adm/messages i need to grep for "error 102" but only if it occured in last 15 mins? Thanks (7 Replies)
Discussion started by: shehzad_m
7 Replies

7. Shell Programming and Scripting

get min, max and average value

hi! i have a file like the attachement. I'd like to get for each line the min, max and average values. (there is 255 values for each line) how can i get that ? i try this, is it right? BEGIN {FS = ","; OFS = ";";max=0;min=0;moy=0;total=0;freq=890} $0 !~ /Trace1:/ { ... (1 Reply)
Discussion started by: riderman
1 Replies

8. Shell Programming and Scripting

crontab in every 05,20,35,50 min

Hi , How can i set a cronjob which needs to run every 05,20,35,50 min . I tried 05,20,35,50 * * * * /exec/eerrtis/tttttk/AOOK00000/bin/Packing.sh.. but its giving error while saving the crontab file .... What is the correct way ??? Thanks and Regards (4 Replies)
Discussion started by: scorpio
4 Replies

9. Post Here to Contact Site Administrators and Moderators

It seems last 20 min Server was very very Slow

Hi Guys, Since last 20-30 min Server was Too slow ..even few of times i got Database connection error. Thanks Sanjay Tripathi (0 Replies)
Discussion started by: SanjayLinux
0 Replies

10. Shell Programming and Scripting

crontab settings for every 10 min eveyday?

Will this be the cron setting if I want to run the script.sh file in every 10 min eveyday? Can someone pls confirm? Thanks in advance C Saha (1 Reply)
Discussion started by: csaha
1 Replies
Login or Register to Ask a Question