function currentJob = getCurrentJob
%getCurrentJob Get the job to which the current task belongs
%
%    job = getCurrentJob returns a reference to the job that contains the
%    current task. This function will return an empty array if executed in a
%    MATLAB session that is not a worker.  This function can be used to access
%    the job data associated with a number of tasks.
%
%    Example:
%    % Find the current job
%    job = getCurrentJob;
%    % Get job data
%    jobData = get(job, 'JobData');
%
% See also parcluster, getCurrentCluster, getCurrentWorker, getCurrentTask

%  Copyright 2000-2020 The MathWorks, Inc.

currentJob = getCurrentEntity('CurrentJob', mfilename);
end

