PLEASE NOTE: this server, secure.csse.uwa.edu.au, will be unavailable on WEDNESDAY 7th December, from 1pm until 4pm.
Web-based programs, such as csmarks, cssubmit, and the help fora, will all be unavailable.
  It's UWAweek 49

help2002

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 4 other people reading this forum.


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

Login to reply

👍?
helpful

Hello friends I have been stuck for a while now on conceptualising a logical flow for simulating the running of the crontab processes. My plan was to have a while loop to iterate through every single minute in the target month, updating the counts of starting/running/terminating processes at the end of every iteration of the loop. Something like, while(is_current_month){ print(current_minute); current_minute++; } However, I am stuck as to how to progress from here. I'm not asking for help with the C language, rather some architectural tips on how to logically step out the process of start, duration, and end of a process within this loop. Do I iterate through every single line in crontab-file, testing if the minute and hour are equal to the current minute and hour? Or if the crontab hour is a "*" and the current minute is 0? etc. This doesn't seem efficient, there would have to be a dozen "if-or-or-or" statements to account for the multiple different combinations of "*" characters and integer entries that could lead to the current minute being a valid time for a process to be started. Apologies for the wall of text, I am sure I'm missing something obvious since no one else has asked this yet. Thanks

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