Coding standards
Security in ResourceSpace
Developer reference
Database
Action functions
Admin functions
Ajax functions
Annotation functions
API functions
Collections functions
Comment functions
Config functions
CSV export functions
Dash functions
Debug functions
Encryption functions
Facial recognition functions
File functions
General functions
Language functions
Log functions
Login functions
Message functions
Migration functions
Node functions
PDF functions
Plugin functions
Render functions
Reporting functions
Request functions
Research functions
Slideshow functions
Theme permission functions
User functions
Video functions
Database functions
Metadata functions
Resource functions
Search functions
Map functions
Job functions
Tab functions
Test functions

get_job_queue_log_path()

Description

Build and ensure a writable log file path for a queued job

Parameters

ColumnTypeDefaultDescription
$type string "" Job category or queue type used as a subdirectory name
$job_code string "" Job identifier used in the log filename
$job_ref string Job reference value used in the log filename

Return

string|false Full path to the log file on success, or false on failure

Location

include/job_functions.php lines 458 to 479

Definition

 
function get_job_queue_log_path(string $type ""string $job_code ""string $job_ref ""): string|false
{
    global 
$offline_job_list;

    if (
$type === "" || $job_code === "" || $job_ref === "" 
            
|| !triggerable_job_check($type)) {
        return 
false;
    }

    
// Build path for logging
    
$log_path get_temp_dir() . "/offline_job_logs/" $type "/";
    if (!
is_dir($log_path)) {
        
$log_path_created mkdir($log_path0770true);
        if (!
$log_path_created) {
            return 
false;
        } else {
            
chmod($log_path0770);
        }
    }

    return 
$log_path $job_ref "_" $job_code ".log";
}

This article was last updated 16th January 2026 17:35 Europe/London time based on the source file dated 16th January 2026 14:45 Europe/London time.