Re: How do I schedule events for execution ?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




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: Use of IF JCL statements
    ... jobs are run manually, outside of a scheduler. ... And try to restart at Step4, ... For IBM-MAIN subscribe / signoff / archive access instructions, ... send email to listserv@xxxxxxxxxxx with the message: GET IBM-MAIN INFO ...
    (bit.listserv.ibm-main)
  • 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: "not enough resources"
    ... after a while it runs out of resources. ... becomes so bad that I need to restart the computer. ... I have ran CCleaner and cleaned up the 958.2MB detritus in the system ... Download, install, update and do a full scan with these free malware ...
    (microsoft.public.windowsxp.general)