ANONYMOUS wrote:
> I have the same question and am stuck on this, too. If we loop over the entire month in minutes, how would we know at what time the command should be executed? Let's say: "0 3 * * * say_hello", would we 'execute' at the 180th minute? How is it possible to calculate the timing in minutes for every crontab file? How would we 'execute' these commands? I apologise about the numerous questions. In slight dire need of help.
If you're iterating from the first minute (starting at 12:00 midnight on the first day of the requested month) to the last minute (44K+ of them) you need to *match* the current minute against the 'pattern' of 5 numbers "0 3 * * *". If they *match* (yes, 180 minutes does match, as does 180 minutes + 24 hours), then the named command begins at those times, and executes for the number of minutes given in the 'estimates' file.
At 180 minutes, the mins=0 matches, the hours=3 matches, the dayofmonth=* matches, the month=* matches, and the weekday=* matches, so the command will start.
The matching does get harder when we need to match specific (valid) days of the week, so review the Workshop where we examined dealing with days, months, and weekdays.