function runprop = pbsSingleZippedTask( runprop )
%

%   Copyright 2007-2019 The MathWorks, Inc.

try
    TASK_ID = getenv('MDCE_TASK_ID');

    jobZipFile = 'Job.zip';
    taskZipFile = sprintf( 'Task.%s.zip', TASK_ID );

    unzip( jobZipFile, pwd );
    unzip( taskZipFile, pwd );

    delete(jobZipFile);
    delete(taskZipFile);
    
    storageConstructor = parallel.internal.cluster.getParallelServerEnv('PARALLEL_SERVER_STORAGE_CONSTRUCTOR');
    storageLocation    = parallel.internal.urldecode( parallel.internal.cluster.getParallelServerEnv('PARALLEL_SERVER_STORAGE_LOCATION') );
    jobLocation        = parallel.internal.cluster.getParallelServerEnv('PARALLEL_SERVER_JOB_LOCATION');
    schedType          = getenv('MDCE_SCHED_TYPE');

    taskLocation = [jobLocation filesep 'Task' TASK_ID];

    % Create empty task files, if necessary
    parallel.internal.cluster.FileStorage.createDefaultTaskFilesIfAbsent([storageLocation filesep taskLocation]);

    dependencyDir = getenv( 'TMPDIR' );
    if ~isempty( dependencyDir )
        set( runprop, 'DependencyDirectory', fullfile( dependencyDir, 'mps.tmp' ) );
    end

    set(runprop, ...
        'StorageConstructor', storageConstructor, ...
        'StorageLocation', storageLocation, ...
        'JobLocation', jobLocation, ....
        'TaskLocation', taskLocation, ...
        'LocalSchedulerName', schedType, ...
        'FallbackSchedulerName', 'parallel.cluster.TaskRunner', ...
        'HasSharedFilesystem', false);
catch err
    dctSchedulerMessage( 1, 'Caught error: %s', err.message );
end

