cron entry


 
Thread Tools Search this Thread
Operating Systems Solaris cron entry
# 1  
Old 08-26-2011
Question cron entry

Hi,

I have to add two cron entry now. Please correct me if anything wrong

Below script should run at every one and half hour.
Code:
30 01 * * * /export/home/gxadm/scripts/collect_mq_info.pl $HOME/GCSS/logs > /dev/null 2>&1

Below script should run at every 2 hours

Code:
0 02 * * * /export/home/gxadm/scripts/copylog.sh > /dev/null 2>&1

Please help me !!

Last edited by pludi; 08-26-2011 at 07:59 AM..
# 2  
Old 08-26-2011
Quote:
Originally Posted by Mani_apr08
Code:
30 01 * * * /export/home/gxadm/scripts/collect_mq_info.pl  $HOME/GCSS/logs > /dev/null 2>&1

This would run the script once a day at 01:30 am. If you want to run the script every 90 minutes, you need two entries in the crontab, like:
Code:
0 0,3,6,9,12,15,18,21 * * * /export/....
30 1,4,7,10,13,16,19,22 * * * /export/....

(assuming you want every 90 minutes starting at midnight).

Quote:
Originally Posted by Mani_apr08
Hi,
Code:
0 02 * * * /export/home/gxadm/scripts/copylog.sh > /dev/null 2>&1

Same here. To run this script every two hours you need:
Code:
0 0,2,4,6,8,10,12,14,16,18,20,22 * * * /export/...

Note: Solaris' cron does not support the slash notation, like
Code:
0 */2 * * * /export/...


Last edited by hergp; 08-26-2011 at 09:10 AM.. Reason: corrected typo
# 3  
Old 08-26-2011
Oh thank, Please help
I want to run at every 30 minutes in this script :
Code:
30,60 * * * * /export/home/gxadm/scripts/collect_mq_info.pl $HOME/GCSS/logs > /dev/null 2>&1

Below script at every 45 minutes
Code:
45,90 * * * * /export/home/gxadm/scripts/copylog.sh > /dev/null 2>&1

Please give advice how to make entry !! Please

Last edited by Scott; 08-26-2011 at 09:37 AM.. Reason: Code tags
# 4  
Old 08-26-2011
Every 30 minutes would be:
Code:
0,30 * * * * ....

Every 45 minutes would need 3 lines:
Code:
0,45 0,3,6,9,12,15,18,21 * * * ....
30 1,4,7,10,13,16,19,22 * * * ....
15 2,5,8,11,14,17,20,23 * * * ...

Note, that the first field in the crontab helds the minutes on the clock, not an interval.
# 5  
Old 08-26-2011
Oh Thank you so much . finally I have entered like this
Code:
30 minutes : 30 1,4,7,10,13,16,19,22 * * * script
45 minutes :  0,45 0,3,6,9,12,15,18,21 * * * script

Thank you .

Mani

Last edited by Scott; 08-26-2011 at 09:38 AM.. Reason: Code tags
# 6  
Old 08-26-2011
# 7  
Old 08-26-2011
Thank you
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Cron entry

Hi I have a system running solaris 11, in which I am able to execute a script from the command line, but once I put i the crontab does run, but do not give results. The entry is: 15 11 * * * /var/oswbb/./startOSWbb.sh >> myjob.log 2>&1 30 11 * * * /var/oswbb/./stopOSWbb.sh I have check... (2 Replies)
Discussion started by: fretagi
2 Replies

2. Solaris

Cron entry not running

Hi I have one entry in my crontab that do not run, in cron, but it runs manually: 53 7 * * * /moneta_polled01/download/./get_dealer.sh 55 7 * * * /moneta_polled01/download/./mov_dealer.sh The first entry do not run automatically, but it runs manually. The second entry runs... (12 Replies)
Discussion started by: fretagi
12 Replies

3. Shell Programming and Scripting

Cron JOb Entry

Hi All, i have a folder in a server say xxx.xx.xx.xx\abcd\efgh. i want to make a cron job entry so that i would get a mail (me@example.com) on business days. will this help me... 30 4 * * 1-5 cd \abcd\efgh|ls-ltr|mailx:me@example.comhttps://www.unix.com/images/editor/code.png (10 Replies)
Discussion started by: mahesh300182
10 Replies

4. UNIX for Advanced & Expert Users

cron entry

Hi, I need some clarification on cron entries. I have a cron job like.. 15 01 19 02 6 exec /usr/bin/test.ksh and I have another cron entry added, which is 15 01 20 02 6 exec /usr/bin/test.ksh So, I am thinking the second cron entry shouldn't have run because 02/20 is Sunday, but... (1 Reply)
Discussion started by: everurs789
1 Replies

5. UNIX for Dummies Questions & Answers

cron entry

Can someone please quickly respond to this? I need to have a script test.sh to run every 30 minutes from Monday to Saturday from 6am to 10pm as a crontab entry... Thanks. (3 Replies)
Discussion started by: everurs789
3 Replies

6. Solaris

User entry in both cron.allow and cron.deny

Hello All, Anybody please help me to know ,what happens when a user having entry in both cron.allow and cron.deny files.Wheather the user will be able to access the crontab??? Thanks in advance Vaisakh (5 Replies)
Discussion started by: ksvaisakh
5 Replies

7. Shell Programming and Scripting

not able to locate the cron entry

Hi, I am new to unix. I have once made an entry into cron file for one scirpt to run. The script sends me email. But i want the script entry removed from the cron file. But i am not able to find the entry in cron file. When i do crontab -e it shows content of the file but my script is... (3 Replies)
Discussion started by: ajincoep
3 Replies

8. Shell Programming and Scripting

Cron Entry

Hi folks, I have got the following cron entry ... 08 30 * * * /mp1/scripts/test.sh > /mp1/scripts/test_logs.txt 2>&1 The problem is that instead of generating a new test_logs.txt file every time it keeps on appending the outputs to the test_logs.txt file. What is it that I am doing wrong... (2 Replies)
Discussion started by: King Nothing
2 Replies

9. UNIX for Dummies Questions & Answers

cron entry

Hi, Where can we find Cron job logs?i have a cron job which is not executing at all, 00 12 * * * /xx/yy/job > /pp/qq/log if i execute the job alone,it is executing fine. >/xx/yy/job > /pp/qq/log (is executing fine) but its not executing when it triggered from cron.is there any place cron... (7 Replies)
Discussion started by: rujus
7 Replies

10. AIX

Cron entry

Hi All, I want to run a cron job to run on the first saturday of each month at 1:30am. Would the following entry suffice this condition 30 1 6 * 6 wall %Will this work% Appreciate your time. (1 Reply)
Discussion started by: rramanuj
1 Replies
Login or Register to Ask a Question