Pausing Execution

There isn't a delivered way to pause the execution of PeopleCode.

However, there are two alternatives that you can use:

  • The java.lang.Thread.sleep() Java Class method or;
  • The DBMS_LOCK.SLEEP() database procedure (Oracle only)

Using java.lang.Thread.sleep()

To use this approach, add the following line to your PeopleCode, passing a value in milliseconds which is the amount of time to sleep:


The code above will sleep for 1000 milliseconds (1 second). Note that this approach still uses up CPU cycles and has a performance hit on the application server. If you find this to be an issue, then the second approach may be better suited if you have an Oracle database.


SQLExec("exec DBMS_LOCK.SLEEP(1)");

The code above will sleep for 1 second.

Revision #1
Created Wed, Jul 24, 2019 3:11 PM by PeopleSoft Wiki
Updated Wed, Jul 24, 2019 3:12 PM by PeopleSoft Wiki