Re: Scripting the creation of complex Scheduled Tasks




"Mike Short" <michael.short@xxxxxxx> wrote

Anyone got another solution?

You could bit flag the tests and assign masks to the tasks.

For example, you run a script every hour that has multiple tests.
If its 8pm on a Mon-Thu, bit 1 of the schedule flag gets set.
If its 1pm on a Friday, bit 2 gets set.
If its 8am on the last day of the month, bit 3 gets set.

Then you keep a list of tasks with their associated schedule masks.
Any task that needs to run Mon-Thur, has bit 1 of its mask set.
Any task that needs to run 1pm on Friday has bit 2 of its mask set.
And so on. If it needs to run at both those times, then both bits are
set, etc...

Once your hourly script has run you have a schedule flag you can
compare (using And) against the task masks. Any tasks whose
mask has the same bit(s) set as the flag needs to run at that time.

You could try to organize it, or you could get more complex (using
and And mask and an Or mask) or you could just go ad hoc, adding
new tests (and bit positions) as new schedules emerge. Anything you
try is not going to be trivial, but certainly doable, depending on how
much effort you want to spend at it....

Just another idea....
LFS



.



Relevant Pages

  • Re: Processing Bit Fields (flag) that represent request as quickly/efficient as possible...is there
    ... > approach when trying to find flag with in a structure of bit fields. ... > needs to process its logic is contained in the Input Data Stores. ... now what I need to do is determine if a flag for a request has ... mask constants to 32-bit integers; ...
    (comp.lang.c)
  • Re: PSL_RF inclusion in PSL_USERCHANGE for i386
    ... that with a mask of allowed flags to be changed. ... PSL_RF (Flag to ensure single-step only happens once per instruction.). ... but popfl doesn't set it for me now and user mode cannot execute iret. ...
    (freebsd-arch)
  • [PATCH 16/21] fat: Fix ATTR_RO for directory
    ... it's just used as flag for app. ... if (!(mask & S_IWUGO)) ... if (attrs & ATTR_DIR) ... Of the r and x bits, all (subject to umask) must be present. ...
    (Linux-Kernel)
  • Re: UserAccountContol Question... Please Help.....
    ... You test by "And"ing the value with a bit mask. ... ' Test flag for password not required. ... If (lngFlag And ADS_UF_PASSWD_NOTREQD) 0 Then ... I do not know if you have every worked with boolean operators, ...
    (microsoft.public.scripting.vbscript)
  • Re: Dumbing down?
    ... a script in C to download it into a PLA ... The lithography machines are programmed straight from the ... It's just barely possible that the CAD system rendered the mask ... a quick hack - far more likely to just scanf each element. ...
    (comp.lang.lisp)

Loading