Re: How do I schedule events for execution ?
- From: pamelafluente@xxxxxxxxx
- Date: 18 Jan 2006 09:07:04 -0800
mmm, You may be right...
.... I would like to hear some other opinion before deciding.
What do you other guys think ?
-Pam
Al Reid ha scritto:
> <pamelafluente@xxxxxxxxx> wrote in message news:1137598587.639678.50000@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> >
> > > If you use the timer approach and spawn the task, this should not be a problem. Just make sure that the scheduler runs on
> reboot.
> > > If you want to be fancy, you can keep track of task launch and completion status and upon restarting the scheduler task, examine
> the
> > > statuses and restart any tasks that did not cpmplete. Yau may even consider making the scheduler a Windows Sercice.
> > >
> >
> >
> > Thank you Al, if I will decide for the timer approach I will certainly
> > do as you suggest. However, I still am afraid that the continuous loop
> > would unnecessaily suck.
> >
> > I have a simple idea based on Rod suggestion.
> >
> > Let's make a simple example.
> >
> > ---------------------------------------------------------------------------------------------------
> > Assume now is Sunday, 10:00am. The users schedule Task1 to be to fire
> > each Monday at 10:00am.
> >
> > When the user schedule the task, I can persist the schedule information
> > on a file.
> >
> > I can start a thread with SLEEP = 24 hours, and at the same time write
> > on the file
> > that Task1 need to be run each Monday at 10:00am.
> >
> > In case of (normal or abnormal) program termination, when the user
> > restart the program
> > I can read the file. Assume that the program is restarted on Monday
> > 8:00:
> > I can reprogram Task1 on a new thread with SLEEP 2 hours.
> > ---------------------------------------------------------------------------------------------------
> >
> > What do you think of this approach. Seems simple and effective (in
> > theory) and I would avoid the continuous loop...
> >
> >
>
> You seem to be worried about the cpu resources required to scan for tasks that need to run (up to thousands) every 29 or 30 seconds.
> I don't see that as a real issue. You are willing to use the resources to spawn thousands of sleeping tasks/threads, sitting arounf
> in memory, using resources, just waiting for the opportunity to run. It seems to me that that approach is more resource hungry and
> perhaps, more prone to causing system problems. If you spawn the task/thread only when required, the overall system resources would
> be minimized, as only the currently running tasks are loaded and running.
>
> Again, just my $0.02.
>
> > -Pam
> >
.
- Follow-Ups:
- Re: How do I schedule events for execution ?
- From: pamelafluente
- Re: How do I schedule events for execution ?
- References:
- How do I schedule events for execution ?
- From: pamelafluente
- Re: How do I schedule events for execution ?
- From: Cor Ligthert [MVP]
- Re: How do I schedule events for execution ?
- From: pamelafluente
- Re: How do I schedule events for execution ?
- From: R. MacDonald
- Re: How do I schedule events for execution ?
- From: pamelafluente
- Re: How do I schedule events for execution ?
- From: pamelafluente
- Re: How do I schedule events for execution ?
- From: Al Reid
- Re: How do I schedule events for execution ?
- From: pamelafluente
- Re: How do I schedule events for execution ?
- From: Al Reid
- Re: How do I schedule events for execution ?
- From: pamelafluente
- Re: How do I schedule events for execution ?
- From: Al Reid
- How do I schedule events for execution ?
- Prev by Date: Cpmute values in Dataset Table??
- Next by Date: Cpmute values in Dataset Table??
- Previous by thread: Re: How do I schedule events for execution ?
- Next by thread: Re: How do I schedule events for execution ?
- Index(es):
Relevant Pages
|