bin/104809: incorrect cron behavior with mday field = "*/N"

Vladimir K. wawaka at gmail.com
Wed Oct 25 10:10:54 PDT 2006


>Number:         104809
>Category:       bin
>Synopsis:       incorrect cron behavior with mday field = "*/N"
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Oct 25 17:10:22 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Vladimir K.
>Release:        6.2-PRERELEASE
>Organization:
>Environment:
FreeBSD bnet.system.lan 6.2-PRERELEASE FreeBSD 6.2-PRERELEASE #0: Sun Oct 15 23:38:56 MSD 2006     root at bnet.system.lan:/usr/obj/usr/src/sys/SYSLAN  i386

>Description:
cron date string
* * */5 * *
does not work if today is ...15th, 20th or 25th...
but works at ...16th, 21th and 26th... days of month

all because of
/usr/src/usr.sbin/cron/cron/cron.c:199:     dom = tm->tm_mday -FIRST_DOM;
and
/usr/src/usr.sbin/cron/cron/cron.h:134:#define      FIRST_DOM       1

this is not expected behavior and should be corrected, imho
>How-To-Repeat:
add to /etc/crontab string like
*      *       */N     *       *       root    /bin/date >> /root/date
where N is divider of the current day of month
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list