How to cause a time delay ( sleep ) from PeopleCode in AE Program

The below code can be used in a PeopleCode Step to cause a delay of 3 minutes - effectively putting the AE to sleep for desired duration.

&current_time = %Datetime;
&delay_time = AddToDateTime(&current_time, 0, 0, 0, 0, 3, 0);
While True
If %Datetime > &delay_time Then
Break;
End-If;
End-While


This program will loop until the time has arrived and then it will go on

Comments

Popular posts from this blog

Peoplesoft Error: All Processing Suspended: Restart OPRID=PS, RUNID=RUN01, PI=5000(108,503)

Peoplesoft SFTP

Error: Think-time PeopleCode event (Exec), but a SQL update has occurred in the commit interval.