PLEASE NOTE: this server, secure.csse.uwa.edu.au, will be unavailable on Wednesday 7th December, from 1pm until 4pm (was Monday 5th).
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 the 5 articles in this topic
Showing 5 of 919 articles.
Currently 3 other people reading this forum.


 UWA week 35 (2nd semester, week 6) ↓
SVG not supported

Login to reply

👍?
helpful
5:56pm Mon 29th Aug, ANONYMOUS

Hello, considering the many potential combinations the crontab file can have (based on the positioning and combination of the * and integers).. how do we ensure we have captured every combination of the file? Thank you


SVG not supported

Login to reply

👍x1
helpful
5:24am Tue 30th Aug, Christopher M.

ANONYMOUS wrote:
> Hello, considering the many potential combinations the crontab file can have (based on the positioning and combination of the * and integers).. how do we ensure we have captured every combination of the file?
It's an unusual goal; generally robust programs are written to handle all possible inputs, detecting and reporting invalid inputs, and correctly handling valid inputs. But, for example, we couldn't imagine or generate all possible inputs that a text-editor would have to handle. Though, this may partially help. We know that the first 4 values of minutes...month can each be 1 or *. In some years the weekday can be also be a 1 for 1st Feb. So we could generate all combinations of 1s and *s, as below. But this doesn't enumerate all possible values, as the minutes could be (0..59, *), hours (0..23, *), and so on, for a total of 5,075,200 (I think). Running through all those combinations is possible - at 0.02seconds each => about 28 hours. But that doesn't account for the fact that we can have multiple commands, which each run for different durations, and can have any combination of different commands running at the same time. So, when you say "many potential combinations", you may mean "countably infinite". 1 1 1 1 1 command 1 1 1 1 * command 1 1 1 * 1 command 1 1 1 * * command 1 1 * 1 1 command 1 1 * 1 * command 1 1 * * 1 command 1 1 * * * command 1 * 1 1 1 command 1 * 1 1 * command 1 * 1 * 1 command 1 * 1 * * command 1 * * 1 1 command 1 * * 1 * command 1 * * * 1 command 1 * * * * command * 1 1 1 1 command * 1 1 1 * command * 1 1 * 1 command * 1 1 * * command * 1 * 1 1 command * 1 * 1 * command * 1 * * 1 command * 1 * * * command * * 1 1 1 command * * 1 1 * command * * 1 * 1 command * * 1 * * command * * * 1 1 command * * * 1 * command * * * * 1 command * * * * * command


SVG not supported

Login to reply

👍?
helpful
8:35pm Tue 30th Aug, ANONYMOUS

Hi, would we need to account for other, more complicated combinations such as, 1-20 or */8 (every eighth month) or 0-20/2 and such in the crontab file?


SVG not supported

Login to reply

👍?
helpful
6:05am Wed 31st Aug, Christopher M.

ANONYMOUS wrote:
> Hi, would we need to account for other, more complicated combinations such as, 1-20 or */8 (every eighth month) or 0-20/2 and such in the crontab file?
No. This was a question asked in the Workshop. The format of our crontab files is greatly simplified compared to the format supported by the system-provided cron utility. If our 1st project required the complex combinations you've listed, there'd be a riot!


SVG not supported

Login to reply

👍?
helpful
2:13pm Wed 31st Aug, ANONYMOUS

"Christopher McDonald" <ch*i*.*c*o*a*[email protected]*a*e*u*a*> wrote:
> ANONYMOUS wrote: > > > Hi, would we need to account for other, more complicated combinations such as, 1-20 or */8 (every eighth month) or 0-20/2 and such in the crontab file? > > No. > This was a question asked in the Workshop. The format of our crontab files is greatly simplified compared to the format supported by the system-provided cron utility. > > If our 1st project required the complex combinations you've listed, there'd be a riot!
Great! What a breath of relief, 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