From nobody@FreeBSD.org  Wed Oct 25 17:08:14 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id E4E6216A403
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 25 Oct 2006 17:08:14 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 80BE543D4C
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 25 Oct 2006 17:07:58 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k9PH7ogL081561
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 25 Oct 2006 17:07:50 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k9PH7oQZ081560;
	Wed, 25 Oct 2006 17:07:50 GMT
	(envelope-from nobody)
Message-Id: <200610251707.k9PH7oQZ081560@www.freebsd.org>
Date: Wed, 25 Oct 2006 17:07:50 GMT
From: "Vladimir K."<wawaka@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: incorrect cron behavior with mday field = "*/N"
X-Send-Pr-Version: www-3.0

>Number:         104809
>Category:       bin
>Synopsis:       cron(8): 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:  Wed Oct 25 17:50:00 GMT 2006
>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@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:
