<div dir="ltr"><div class="gmail_default" style="font-size:small">DavidTL,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Thanks for your feedback!  64 bit #Delay does have a much broader range than what is indicated on the Wiki. Your suggestion about using #Scheduler sounds good and there must be a compelling reason to use it over #Delay; why else go to the effort to create a new class? I have it installed in my image now and learning how to use it.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">-jrm</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jun 27, 2019 at 7:36 PM David T. Lewis <<a href="mailto:lewis@mail.msen.com">lewis@mail.msen.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, Jun 27, 2019 at 07:00:08PM -0700, John-Reed Maffeo wrote:<br>
> David,<br>
> <br>
> Thank you! Your observation about #Schedule, it seems to be correct. I have<br>
> been trying things out since I sent my original question and came to the<br>
> same conclusion,  it just builds a collection of #DateAndTime objects which<br>
> may be useful in conjunction with #Delay.<br>
> <br>
> Some tests with #Delay in a current 64 bit image produce results which<br>
> produce results which exceed the limit of ~six days which I mentioned in my<br>
> original post. I got the limit from the Delay<br>
> <<a href="http://wiki.squeak.org/squeak/3134" rel="noreferrer" target="_blank">http://wiki.squeak.org/squeak/3134</a>> entry on the Squeak Wiki.<br>
<br>
It is quite possible that the six day limit goes away on a 64 bit<br>
image (I did not check) because SmallInteger is not small any more :-)<br>
<br>
As a side note, you can delay for 365 days like this:<br>
<br>
  d := 1 day asDelay.<br>
  365 timesRepeat: [ d wait ].<br>
<br>
But relying on long delays to execute a schedule does not sound like<br>
a very good idea anyway, so the Scheduler package by John Pierce sounds<br>
like a good tip.<br>
<br>
If you are concerned with tracking daylight savings time changes in<br>
your schedules, the TZ-Olson package on SqueakMap may be useful (latest<br>
Squeak trunk only).<br>
<br>
Dave<br>
<br>
<br>
> <br>
> So I have two options to investigate now #Delay and #Scheduler.<br>
> <br>
> Thanks for looking up Torsten's version. I had seen a mention of it, but I<br>
> was trying to stay within the bounds of a standard release. I will take a<br>
> look.<br>
> <br>
> Regards,<br>
> <br>
> -jrm<br>
> <br>
> P.S. For someone who has been away from Squeak for a long time, you still<br>
> have very good advice to share :-)<br>
> <br>
> On Thu, Jun 27, 2019 at 6:34 PM David Shaffer <<a href="mailto:cdshaffer@acm.org" target="_blank">cdshaffer@acm.org</a>> wrote:<br>
> <br>
> > I???ve been away from Squeak for a long time but I don???t think Schedule does<br>
> > what you want.  I browsed the code a bit and it seems to be more about<br>
> > /storing/ a schedule rather than /executing/ one.<br>
> ><br>
> > John Pierce wrote a package called Scheduler which I used with great<br>
> > success many (many) years ago.  The SqueakMap entry still exists but the<br>
> > file links are dead.  I have attached my latest version of that package.  I<br>
> > tried it out in Squeak 5.2 and it seemed to work but I can???t make any<br>
> > promises.  I don???t think it will have the same problems as a long Delay<br>
> > since its main loop seems to check for runnable tasks every 1/4 second.<br>
> ><br>
> > The SqueakMap page has some docs:<br>
> > <a href="http://map.squeak.org/package/cb344d5b-c810-45cd-a440-534d900aacfd" rel="noreferrer" target="_blank">http://map.squeak.org/package/cb344d5b-c810-45cd-a440-534d900aacfd</a><br>
> ><br>
> > BTW, to load the MCZ you can use the File List (under Tools).<br>
> ><br>
> > Best,<br>
> ><br>
> > David<br>
> ><br>
> ><br>
> > On Jun 24, 2019, at 5:16 PM, John-Reed Maffeo <<a href="mailto:jrmaffeo@gmail.com" target="_blank">jrmaffeo@gmail.com</a>> wrote:<br>
> ><br>
> > I am working on an application which requires task scheduler like cron on<br>
> > UNIX or Task Manager on Windows. In the swiki , there is a page about Refactored<br>
> > Date and Time Classes <<a href="http://wiki.squeak.org/squeak/1871" rel="noreferrer" target="_blank">http://wiki.squeak.org/squeak/1871</a>> which mentions<br>
> > #Schedule in the context of TV programs. I have figured out how to set up,<br>
> > but I can not figure out how to use it productively.<br>
> ><br>
> > My simple use case is:<br>
> > a. create an instance of #Schedule<br>
> > b. Use the schedule to write a string to the Transcript based on the<br>
> > contents of the schedule.<br>
> ><br>
> ><br>
> > |sampleSchedule  rightNow cr |<br>
> ><br>
> > rightNow := DateAndTime now.<br>
> > cr := String cr.<br>
> ><br>
> > sampleSchedule := Schedule starting: rightNow  ending: rightNow + 20<br>
> > minutes .<br>
> ><br>
> > sampleSchedule schedule: {Duration minutes: 1. Duration minutes: 3}.<br>
> > sampleSchedule  scheduleDo:[:each |Transcript show: each asString, String<br>
> > cr].<br>
> > >> This results in all of the schedule items being written to the<br>
> > Transcript immediately, rather at the schedule time for each.<br>
> ><br>
> > How to I use a schedule to run a block at the time specified by the<br>
> > schedule.<br>
> ><br>
> > I have looked at #Delay, but it has a limit of ~six days which will not<br>
> > work for me.<br>
> ><br>
> > Thanks,<br>
> ><br>
> > -jrm<br>
> ><br>
> ><br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > Beginners mailing list<br>
> > <a href="mailto:Beginners@lists.squeakfoundation.org" target="_blank">Beginners@lists.squeakfoundation.org</a><br>
> > <a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > Beginners mailing list<br>
> > <a href="mailto:Beginners@lists.squeakfoundation.org" target="_blank">Beginners@lists.squeakfoundation.org</a><br>
> > <a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br>
> ><br>
<br>
> _______________________________________________<br>
> Beginners mailing list<br>
> <a href="mailto:Beginners@lists.squeakfoundation.org" target="_blank">Beginners@lists.squeakfoundation.org</a><br>
> <a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br>
<br>
_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@lists.squeakfoundation.org" target="_blank">Beginners@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" rel="noreferrer" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br>
</blockquote></div>