Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
Operating System - Tru64 Unix
cancel
Showing results for 
Search instead for 
Did you mean: 

Question on crontab usage

SOLVED
Go to solution
Bobcat_1
Advisor

Question on crontab usage

Hi,

OS Type : Tur64 Unix V5.1
My cron entry are as follows ;

00,15,30,45 08-00 * * *

The job gets started at 08.00am, 08.15,08.30,08.45, 09.00,09.15,09.30,09.45....so on until it reaches at 11.45pm and it stops and it will continue next day at 08.00am again.

I want it to run at 12 midnight as well before starting at 08.00am the next day.
Is definition in the crontab wrong ?

Thanks.
7 REPLIES
Mobeen_1
Esteemed Contributor
Solution

Re: Question on crontab usage

Bob,
In that case, i would suggest that you have 2 entries for your job. Let the existing job run as it is and just add another line and make an entry to run daily at mid-night.

regards
Mobeen
Ravi_8
Honored Contributor

Re: Question on crontab usage

Hi,

In that case you need to have 2 entries starting at midnight and other at 8 a.m.

you can't specify both midnight and 8 a.m in cron entry
never give up
Orrin
Valued Contributor

Re: Question on crontab usage

Hi,

Depending on how long the job runs for you can add 59 after the 45, which will run the job at 11:59pm.

The only other option is to run the job one time, using another entry in the crontab.

I assume that you want a single entry because of the logs the job generates, in that case your best option is to go for the 11:59 option.

Regards,
Orrin.
Michael Schulte zur Sur
Honored Contributor

Re: Question on crontab usage

Hi,

take
0,15,30,45 8-23 * * *
0 0 * * *
if you do not want to run it at 00:30 and 00:45 and
0,15,30,45 0,8-23 * * *
if it does not matter.

greetings,

Michael

Bobcat_1
Advisor

Re: Question on crontab usage

Hi,
Thanks for all the help.

Regards.
Michael Schulte zur Sur
Honored Contributor

Re: Question on crontab usage

Bob,

I noticed, that you haven't used the point system so far to award points to those, who tried to help you. Please read the following text to understand the purpose of the points here:
http://forums1.itrc.hp.com/service/forums/helptips.do?#28

thanks,

Michael
Mobeen_1
Esteemed Contributor

Re: Question on crontab usage

Michael,
Thanks for getting me my 10 :-)

Have a good day

rgds
Mobeen