wwm@pmsmam.uucp (Bill Meahan) (09/15/90)
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?
System: HP9000/825
HP-UX (SYSV + BSD ++) version 2.1 (older)
Any thoughts would be greatly appreciated!
Thanks.
--
Bill Meahan WA8TZG |"The freedom of human beings is not a condition
uunet!mailrus!umich!pmsmam!wwm |but a task. What an absence of shackles means
|is our duty to know and to establish our own
"I do NOT speak for anyone |limits. It is often more difficult to be free
but me, myself and I!" |than not to be free ...." -Bela Varga
jad@hpcndnm.hp-sdd (John A Dilley) (09/15/90)
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 --
sartin@hplabsz.HPL.HP.COM (Rob Sartin) (09/15/90)
In article <JAD.90Sep14131818@hpcndnm.hp-sdd> jad@hpcndnm.hp-sdd (John A Dilley) writes: >In article <1990Sep14.171634.15987@pmsmam.uucp> wwm@pmsmam.uucp (Bill Meahan) writes: >> 19 2 1 1-12 0-6 [command to be executed] > 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: ...and give an explanation. What John left out is the answer to "what is a valid way to specify a command to run on the first of every month?" The answer is: 19 2 1 * * [command to be executed] Rob Sartin internet: sartin@hplabs.hp.com Software & Systems Lab uucp : hplabs!sartin Hewlett-Packard voice : (415) 857-7592 If HP has/had an official net.spokesman it wouldn't be me.