Browse docs
Server Exports
All three exports belong to sky_jobcreator and run on the server. They take no arguments. They expose installation and definition-startup state; they do not create jobs or authorize an administrator.
| Export | Returns | Purpose |
|---|---|---|
GetAutoInstallFramework() | boolean | Read the plaintext automatic-installation switch. |
AwaitFrameworkDefinitions() | boolean, after yielding if necessary | Wait for Creator's one-time definition-startup result. |
GetInstallerStatus() | Status table/object | Inspect the framework-file installer's current result. |
GetAutoInstallFramework()
local automatic_installation = exports["sky_jobcreator"]:GetAutoInstallFramework()
print("Automatic framework installation:", automatic_installation)
Returns the current boolean Config.AutoInstallFramework from sky_jobcreator/config/config.lua. An invalid non-boolean setting raises an error. The call does not start installation, change the setting, read /jobconfig overrides or report whether hooks have loaded.
The equivalent JavaScript call is:
const enabled = exports.sky_jobcreator.GetAutoInstallFramework();
AwaitFrameworkDefinitions()
Use this only when your server workflow must wait for Creator's definitions. Call from a yielding FiveM Lua context, such as a thread or an existing scheduled event/callback:
CreateThread(function()
local definitions_ready = exports["sky_jobcreator"]:AwaitFrameworkDefinitions()
if not definitions_ready then
print("Creator definitions failed to initialize; dependent work was stopped")
return
end
-- Continue the server workflow that requires restored framework definitions.
end)
| Result | Meaning |
|---|---|
true | Creator received a successful result from its sky_jobscreator_migration database/definition startup stage. |
false | That stage failed, or the unresolved gate reached its 60-second startup deadline. The resource-stop handler also attempts to resolve an unfinished gate as false. |
The deadline starts when Creator loads framework_ready.lua, not when your script calls the export. The first resolution wins and is reused for later calls during that resource lifetime. There is no timeout argument, reset argument or retry action on this export.
The successful resolution happens before Sky_Jobs.GenericJobs.Start() in Creator's main startup path. It therefore does not establish that generic gameplay, society-account activation, all Jobs Base stages, the framework installer or a player's client/NUI is ready. Inspect the relevant owner's state separately.
A stopped resource or interrupted export call can fail at the runtime boundary; do not treat a lost reply as a successful gate result. The supplied QBCore/Qbox login hook uses this gate to stop character loading when definitions did not initialize. Do not add another copied login hook if the installer has already installed it.
GetInstallerStatus()
This is a read-only status lookup. It does not wait for installation and does not run it again.
local installation = exports["sky_jobcreator"]:GetInstallerStatus()
print("Creator installer:", installation.state)
if installation.state == "failed" then
print("Installer error:", installation.error)
elseif installation.state == "restart_required" then
print("Framework files were updated on disk; plan a full server restart")
end
const installation = exports.sky_jobcreator.GetInstallerStatus();
console.log('Creator installer:', installation.state);
Status fields
| Field | Type | Meaning |
|---|---|---|
state | string | One of the states below. |
framework | Optional string | esx, qb or qbox on a successful completed check/write. Absent on pending, disabled and failure results. |
changed | List | Confirmed changes for a successful write, otherwise empty. Each entry contains file, backup and removed. |
error | string or nil/null | Failure message, otherwise no error. |
Each changed entry contains a framework-relative file path, the private absolute backup path and a list of replaced integration labels in removed. Keep backup paths and diagnostic errors on the server; do not send the full object to ordinary clients or public logs.
Installer states
| State | Meaning and next step |
|---|---|
pending | Installation has not finished. A lookup immediately after startup can return this state. Check the subsequent startup report or read the status again when needed. |
disabled | Config.AutoInstallFramework is false. This does not verify a manual installation. |
installed | The recognized framework files already match the generated hooks; this run changed no files. This does not prove that the currently running framework has loaded those files. |
restart_required | Planned changes were written and verified on disk. A planned full server restart is needed to load them. The export does not perform that restart. |
failed | Detection, validation or writing failed. Read error and the startup report before making another attempt. |
On failure, an empty changed list does not prove that no file was written. A multi-file write or worker timeout can leave partial changes before a failure is reported. Inspect the actual framework files and .sky_jobscreator-installer-backups/ before retrying or restoring. Do not interpret a timed-out worker as a rollback.
For permissions, backups and normal startup order, see Installation.