It's UWAweek 48


This forum is provided to promote discussion amongst students enrolled in CITS2002 Systems Programming.
Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.

Displaying selected article
Showing 1 of 919 articles.
Currently 6 other people reading this forum.

 UWA week 37 (2nd semester, week 7) ↓
SVG not supported

Login to reply


> 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.

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  1:17AM Sep 14 2022
Privacy policy