PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

GetJobsInfo

Returns a table containing basic information about the jobs performed by the task scheduler

In computing, a task scheduler is a system responsible for executing key tasks at the appropriate intervals.

You can also find live task scheduler statistics in the Task Scheduler window in Roblox Studio.

The first entry in the table returned is a reference dictionary containing the statistics (or headings) available. It is in the following format:

{
    ["name"] = "name",
    ["averageDutyCycle"] = "averageDutyCycle",
    ["averageStepsPerSecond"] = "averageStepsPerSecond",
    ["averageStepTime"] = "averageStepTime",
    ["averageError"] = "averageError",
    ["isRunning"] = "isRunning",
}

The subsequent entries in the table returned are dictionaries containing the above statistics for jobs performed by the task scheduler. For example:

{
    ["name"] = "Heartbeat",
    ["averageDutyCycle"] = 0,
    ["averageStepsPerSecond"] = 0,
    ["averageStepTime"] = 0,
    ["averageError"] = 0,
    ["isRunning"] = false,
}

See also

  • TaskScheduler
  • DataModel/GetJobsExtendedStats
  • DataModel/GetJobIntervalPeakFraction
  • DataModel/GetJobTimePeakFraction

Returns

Return Type Summary

A table containing information about the jobs performed by the task scheduler, see above for the format


Code Samples


DataModel:GetJobsInfo

Here is an example of iterating over the job info.

local jobInfo = game:GetJobsInfo()
local jobTitles = jobInfo[1]

table.remove(jobInfo,1)

local divider = string.rep("-",120)
print(divider)
warn("JOB INFO:")
print(divider)

for _,job in pairs(jobInfo) do
	for jobIndex,jobValue in pairs(job) do
		local jobTitle = jobTitles[jobIndex]
		warn(jobTitle,"=",jobValue)
	end
	print(divider)
end