Python

Moderators: None (Apply to moderate this forum)
Number of threads: 474
Number of posts: 1166

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Loop or Parse Tree of Requirments Posted by bquad20 on 31 Aug 2004 at 10:23 AM

I have a question on stepping through a loop or a tree
of requirements. Currently I have 3 lists built that I
need to get info from:

scriptsThatShouldRun []

# list built from a DB
scriptsThatDidRun []

# every minute of that particular day
minutesList []


This next part is where I need some help because it gets
a little tricky.

I have to check each element of the "scriptsThatShouldRun"
list against the "minutesList" list and break down each
bit of info to compare in that list: day of week, month,
day of month, hour and minute.

If the minutesList shows: Mon Aug 31 00:00, then I need to
see if the scriptsThatShouldRun matches this exactly so I
check: the day of week, month, date, hour and minute

If it does MATCH, then I will then compare against the list
scriptsThatDidRun and look if it has the same value, if it
does append to a success list or if its not in there append
to a failure list.

If it does NOT MATCH, then I ignore it and move onto the next
element of the list because that item "scriptsThatShouldRun"
is NOT eligible to run @ that time of day, so nothing should
happen.

In basic words:

The whole point is to check the scriptsThatShouldRun list
against the scriptsThatDidRun all the while looping through
the minutesList list (every minute of the day). The basic
meaning of this is to go minute by minute and check if a
a script is eligible to run, if it is, compare and see if
it really did run and report on that.

Basically, if the time in minutesList matches the time in
scriptsThatShouldRun, I need to check the scriptsThatDidRun
and append to success or failure.

I hope this all makes sense? Any code examples or pointers
you may have would be very helpful.

Thanks in advance!
Thread Tree
bquad20 Loop or Parse Tree of Requirments on 31 Aug 2004 at 10:23 AM
infidel Re: Loop or Parse Tree of Requirments on 31 Aug 2004 at 10:55 AM
bquad20 Re: Loop or Parse Tree of Requirments on 1 Sept 2004 at 9:21 AM
infidel Re: Loop or Parse Tree of Requirments on 1 Sept 2004 at 11:16 AM
bquad20 Re: Loop or Parse Tree of Requirments on 1 Sept 2004 at 4:35 PM
infidel Re: Loop or Parse Tree of Requirments on 2 Sept 2004 at 8:18 AM
bquad20 Re: Loop or Parse Tree of Requirments on 2 Sept 2004 at 2:10 PM
infidel Re: Loop or Parse Tree of Requirments on 2 Sept 2004 at 3:16 PM
bquad20 Re: Loop or Parse Tree of Requirments on 3 Sept 2004 at 10:12 AM
infidel Re: Loop or Parse Tree of Requirments on 3 Sept 2004 at 11:06 AM
bquad20 Re: Loop or Parse Tree of Requirments on 8 Sept 2004 at 9:58 AM



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.