eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'BackgroundPeriodicalJob':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: BackgroundPeriodicalJob


Inheritance:

   Object
   |
   +--AbstractBackgroundJob
      |
      +--BackgroundPeriodicalJob

Package:
stx:libbasic2
Category:
System-Support-JobQueue
Version:
rev: 1.6 date: 2021/04/09 14:37:32
user: cg
file: BackgroundPeriodicalJob.st directory: libbasic2
module: stx stc-classLibrary: libbasic2

Description:


A BackgroundPeriodicalJob is a specialized form
of a BackgroundJob that performs given job periodically
i.e., every X milliseconds.


[instance variables:]
    interval       <TimeDuration>     how often to perform a job.

[class variables:]

copyright

COPYRIGHT (c) 2010 by Jan Vrany, SWING Research Group. CTU in Prague All Rights Reserved Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Instance protocol:

accessing
o  interval

o  interval: anIntegerOrTimeDuration

processing
o  process
(comment from inherited method)
Actually perform the job. This method is called from the background worker thread


Examples:


| job text |
text := 'Hello world'.
job :=  BackgroundPeriodicalJob named: 'example job' on:[
            Transcript showCR:'One guy said: ', text
        ].
job interval: 1000.
job start.
Delay waitForSeconds: 3.
text := 'Haya, you should see this text repeating every second....'.
job restart.        
Delay waitForSeconds: 3.
job stop.


ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sat, 27 Jul 2024 03:59:24 GMT