[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: a problem on crontab time format



Thanks a lot. I just think it's at least a `weak' bug: Any crontab
item specifying the minute slot as `*' may be a potential disaster.


On Sun, Jan 23, 2011 at 00:32, elbbit <elbbit@gmail.com> wrote:
> On 23/01/11 05:14, Kejia柯嘉 wrote:
>> On Sun, Jan 23, 2011 at 12:11 AM, Kejia柯嘉 <w.kejia@gmail.com> wrote:
>>> 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
>>
>
> You need to understand how cron(8) matches the time code you set in the
> configuration file.  To re-iterate the man page available with "man 5
> crontab":
>
>    field          allowed values
>    -----          --------------
>    minute         0-59
>    hour           0-23
>    day of month   1-31
>    month          1-12 (or names, see below)
>    day of week    0-7 (0 or 7 is Sun, or use names)
>
> A field may be an asterisk (*), which always stands for ``first-last''.
>
> So, using the above as a guide, I approximate a translation of your
> configuration line as saying: "at every minute of the hour 1 on every
> day of month and during every month and on every day of the week please
> run command my_command"
>
> Hope this helps.
>
> --
>
> elbbit
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> Archive: [🔎] 4D3BBD60.1030309@gmail.com">http://lists.debian.org/[🔎] 4D3BBD60.1030309@gmail.com
>
>


Reply to: