TimeTrex API Manual

BackgroundProcess
in package

Table of Contents

$lock_file_dir  : mixed
$lock_file_postfix  : mixed
$lock_file_prefix  : mixed
$max_lock_file_age  : mixed
$max_process_check_sleep  : mixed
$max_process_check_timeout  : mixed
$max_processes  : mixed
$process_number_digits  : mixed
__construct()  : mixed
BackgroundProcess constructor.
BackgroundExec()  : bool
getBaseLockFileName()  : string
getCurrentProcesses()  : int
getLockFileDirectory()  : string
getLockFilePrefix()  : string
getLockFiles()  : array<string|int, mixed>|bool
getMaxProcesses()  : int
getNextLockFileName()  : string
purgeLockFiles()  : bool
Delete any lock files older then max age, incase they are stale.
ReplaceCommandVariables()  : mixed
run()  : bool
setLockFileDirectory()  : bool
setLockFilePrefix()  : bool
setMaxProcesses()  : bool
wait()  : bool
Waits for all background processes to finish.

Properties

Methods

getBaseLockFileName()

public getBaseLockFileName([bool $include_dir = false ]) : string
Parameters
$include_dir : bool = false
Return values
string

getCurrentProcesses()

public getCurrentProcesses( $lock_files) : int
Parameters
$lock_files :
Return values
int

getLockFiles()

public getLockFiles([mixed $purge_lock_files = true ]) : array<string|int, mixed>|bool
Parameters
$purge_lock_files : mixed = true
Return values
array<string|int, mixed>|bool

getNextLockFileName()

public getNextLockFileName( $lock_files) : string
Parameters
$lock_files :
Return values
string

purgeLockFiles()

Delete any lock files older then max age, incase they are stale.

public purgeLockFiles( $lock_files[, mixed $check_pids = false ]) : bool
Parameters
$lock_files :
$check_pids : mixed = false
Return values
bool

ReplaceCommandVariables()

public ReplaceCommandVariables( $cmd,  $next_lock_file_name) : mixed
Parameters
$cmd :
$next_lock_file_name :
Return values
mixed

run()

public run( $cmd[, mixed $skip_on_max_processes = false ]) : bool
Parameters
$cmd :
$skip_on_max_processes : mixed = false
Return values
bool

setLockFileDirectory()

public setLockFileDirectory( $dir) : bool
Parameters
$dir :
Return values
bool

setLockFilePrefix()

public setLockFilePrefix( $prefix) : bool
Parameters
$prefix :
Return values
bool

wait()

Waits for all background processes to finish.

public wait([int $timeout = 300 ]) : bool
Parameters
$timeout : int = 300

seconds.

Return values
bool

Search results