Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
RunTask.Wait
Waits for current task to terminate.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
RunTask | 6.4 | ✅ Yes | ❌ No | ❌ No | ✅ Yes, on macOS | ❌ No |
Deprecated
This function was deprecated. Use Shell functions instead.
MBS( "RunTask.Wait"; Timeout ) More
Parameters
Parameter | Description | Example |
---|---|---|
Timeout | The maximum time to wait. | 30 |
Result
Returns 1, 0 or error.
Description
Waits for current task to terminate.Returns 0 if task terminated or 1 if task is still running.
Examples
Run a shell tool and wait for ending:
Let ( [
r = MBS( "RunTask.NewTask" );
r = MBS( "RunTask.SetLaunchPath"; "/bin/sh" );
r = MBS( "RunTask.SetArguments"; "-c"; "date;sleep 5;date" );
r = MBS( "RunTask.Launch");
r = MBS( "RunTask.Wait"; "30");
output = MBS( "RunTask.ReadOutputText"; "utf8")
]
; output )
See also
Example Databases
Blog Entries
This function checks for a license.
Created 22nd September 2016, last changed 13th June 2020
