Re: Scripting the creation of complex Scheduled Tasks
- From: "Larry Serflaten" <serflaten@xxxxxxxxxxxxxx>
- Date: Tue, 14 Jul 2009 10:02:18 -0500
"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
.
- References:
- Scripting the creation of complex Scheduled Tasks
- From: Mike Short
- Scripting the creation of complex Scheduled Tasks
- Prev by Date: Re: string manipulation - join lines
- Next by Date: Re: string manipulation - join lines
- Previous by thread: Re: Scripting the creation of complex Scheduled Tasks
- Next by thread: Re: Scripting the creation of complex Scheduled Tasks
- Index(es):
Relevant Pages
|
Loading