PHP instance method
ServiceCall->schedule
Description
Schedule a POST service call for later execution and thus avoid long execution time of the current request.
Examples
[%$delay_in_s = 0;
foreach ($invoices as $invoice) {
$delay_in_s += 5;
$call = new ServiceCall("emailinvoice", ["invoice" => $invoice]);
$call->schedule(new DateInterval("PT" . $delay_in_s . "S"));
}%]
|
Parameters
Coding name |
when
|
Description |
When the service call should be executed. Might be in the past, but the earliest time the call is actually processed is after the current request has finished.
|
Position |
1
|
Type |
|
Default value |
Now
|
Examples |
- [%new DateInterval("PT3S")%]
- [%new DateTime("2030-12-31")%]
|
|
We are sorry
This page cannot be displayed in your browser. Use Firefox, Opera, Safari, or Chrome instead.