Re: How do I schedule events for execution ?

Tech-Archive recommends: Speed Up your PC by fixing your registry




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
> >

.



Relevant Pages

  • Re: How do I schedule events for execution ?
    ... Just make sure that the scheduler runs on ... >> statuses and restart any tasks that did not cpmplete. ... You are willing to use the resources to spawn thousands of sleeping tasks/threads, ...
    (microsoft.public.dotnet.languages.vb)
  • Re: "Non-volatile" OS ?
    ... >> process plus any OS resources used by the process (things like file ... file system plugged in on a USB key. ... a smooth shutdown, ... then restart all processes and message them ...
    (comp.arch.embedded)
  • Re: Task Scheduler stopped running and Im unable to restart
    ... restart the Task Scheduler. ... one of the files that one of the jobs was logging to had become corrupted ... You also could try System Restore if you have a ... I've down everything that I can think of to restart it. ...
    (microsoft.public.windowsxp.security_admin)
  • Re: Difference between taskRestart() and taskDelete() + taskSpawn()
    ... The shell utilizes this routine to restart itself when aborted. ... a spawn will allocate the required resources. ...
    (comp.os.vxworks)
  • Re: List of running processes in C++
    ... scheduler or an administrator. ... are just data processing programs that require a lot of memory. ... Ahh, so is the question "how can I keep two programs from operating on ... Ahh, so perhaps the question is, "how can I verify the resources my ...
    (comp.unix.programmer)