Re: a problem on crontab time format
On Sun, 23 Jan 2011 16:23:55 +0100, Gilles Mocellin wrote:
> Le dimanche 23 janvier, Camaleón écrivit :
>
>> On Sun, 23 Jan 2011 00:14:01 -0500, Kejia柯嘉 wrote:
>>
>> > On Sun, Jan 23, 2011 at 12:11 AM, Kejia柯嘉 wrote:
>> >> Hi people,
>> >>
>> >> How does the following crontab line run: * 1 * * * * my_command
>> >> Every minute of every 1 o'clock? Or only once of every 1 o'clock?
>>
>> > Sorry, the crontab line is:
>> > * 1 * * * my_command
>>
>> It will run "my_command" (just once) every day at 01:00 am o'clock.
>
> No, for what you want, you should use :
> 0 1 * * * my_command
And you're totally right!
*Correction*: an asterisk in the minutes column would make the task to be
run once every minute starting from the selected hour (1 am) until the
next hour (1:59 am).
Greetings,
--
Camaleón
Reply to: