Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!sdd.hp.com!hp-sdd!jad From: jad@hpcndnm.hp-sdd (John A Dilley) Newsgroups: comp.sys.hp Subject: Re: What is crontab doing with this? Message-ID: Date: 14 Sep 90 17:18:18 GMT References: <1990Sep14.171634.15987@pmsmam.uucp> Sender: news@sdd.hp.com (Usenet News) Organization: Hewlett Packard, Colorado Networks Division Lines: 56 In-Reply-To: wwm@pmsmam.uucp's message of 14 Sep 90 17:16:34 GMT Nntp-Posting-Host: hpcndnm.cnd.hp.com In article <1990Sep14.171634.15987@pmsmam.uucp> wwm@pmsmam.uucp (Bill Meahan) writes: > > According to my understanding of the man page for crontab, the following > line in my crontab file should cause the command to be executed at 2:19 AM > on the First day of each month: > > 19 2 1 1-12 0-6 [command to be executed] > > But, the system appears to be executing the command EVERY DAY at 2:19 AM. > > What's going on here? If you specify the days two different ways (as above where you specify both day of the month and day of the week), BOTH get executed. So your above entry says to run command at 2:19 the first day of each month and every Sunday-through-Saturday. From the crontab(1) manual: | A crontab file consists of lines of six fields each. The | fields are separated by spaces or tabs. The first five are | integer patterns that specify the following: | | minute (0-59), | hour (0-23), | day of the month (1-31), | month of the year (1-12), | day of the week (0-6 with 0=Sunday). | | Each of these patterns may be either an asterisk (meaning | all legal values), or a list of elements separated by | commas. An element is either a number, or two numbers | separated by a minus sign (meaning an inclusive range). | Note that the specification of days may be made by two | fields (day of the month and day of the week). If both are | specified as a list of elements, both are adhered to. For | example, 0 0 1,15 * 1 would run a command on the first and | fifteenth of each month, as well as on every Monday. To | specify days by only one field, the other field should be | set to * (for example, 0 0 * * 1 would run a command only on | Mondays). Regards, -- jad -- John DILLEY Hewlett-Packard Colorado Networks Division UX-mail: jad@cnd.hp.com Phone: (303) 229-2787 -- This is not an official statement of Hewlett-Packard Corp., and does not necessarily reflect the views of HP. The information above is provided completely without warranty of any kind. (Of course, it is factual ...) -- jad --