crontab question

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Kevin Brown
Date:  
Subject: crontab question
Lynn David Newton wrote:

> >> If I have a 6 in the hour field of a crontab
> >> entry, does that mean the job will run only at 6am
> >> or will it run at 4pm too (16:00)?
> >>
> >> I'm thinking 6am only. Do I understand this correctly?
>
> Kevin> if you put just a 6 in the hour field, then it
> Kevin> will only run at 6am. If you want it to run at
> Kevin> more than that hour, then you would do
> Kevin> something like:
>
> Kevin> * 6,14 * * * command <--- runs at 6am and 2pm
>
> I believe as shown, this would every single minute from
> 6:00 to 6:59, and 14:00 to 14:49. If that's not the
> intent, then substitute a 0 (or some other integer
> representing minutes after the hour) for the first
> asterisk.
>


Oops, good catch.