guides:programming:programmers_reference_manual:idleprocqueue

IDLEPROCQUEUE property

System Object

This is an enhancement to the existing IDLEPROC property as it allows you to queue multiple requests via the new SYSTEM ADDIDLEPROC method:

* // Run a process in the future

procID     = "RUN_SOME_PROCESS"

procArg   = "42"

procTime = "12:00:00"; * %%//%% midday

procDate  = oconv( date() + 1, "D4/" ) ; * %%//%% tomorrow

 

call exec_Method( "SYSTEM", "ADDIDLEPROC", procID, procArg, procTime, procDate )

 

* // Run a process ASAP...

procID  = "RUN_SOME_OTHER_PROCESS"

procArg = "X43"

procTime = ""; * %%//%% ASAP

procDate = ""; * %%//%% ASAP

 

call exec_Method( "SYSTEM", "ADDIDLEPROC", procID, procArg, procTime, procDate )

The contents of the queue can be examined via the new SYSTEM IDLEPROCQUEUE property:

ipQ      = get_Property( "SYSTEM", "IDLEPROCQUEUE" )

xCount = fieldCount ( ipQ, @fm )

for x = 1 to xCount

     ip           = ipQ<x>

     procID    = ipQ<0,1>

     procArg   = ipQ<0,2>

     procTime = ipQ<0,3>

     procDate = ipQ<0,4>

next

The normal IDLEPROC property works just as it always has done with the following caveats:

* Setting the IDLEPROC property will replace the entire contents of the queue (so you can use this to clear the queue if you wish).

* Getting the IDELPROC property will only return the first item in the queue if there are multiple items.

  • guides/programming/programmers_reference_manual/idleprocqueue.txt
  • Last modified: 2024/06/19 20:20
  • by 127.0.0.1