Skip to main content

Overview

lua jobs manages scheduled jobs defined with LuaJob. It mirrors the surfaces available for skills (view, versions, deploy, activate, deactivate, delete) and adds two job-specific actions: trigger (manual fire) and history (execution log).
lua jobs                                  # Interactive management
lua jobs view                             # List all jobs
lua jobs versions -i myJob                # List versions for a job
lua jobs trigger -i healthCheck           # Fire a job manually
lua jobs history -i myJob                 # View execution history
For defining jobs in code, see LuaJob API. For creating jobs dynamically from inside a tool at runtime, see Jobs API.

Subcommands

ActionWhat it does
viewList all jobs defined on the agent.
versionsList every version of a specific job.
deployPromote a version to active.
activateRe-enable a deactivated job.
deactivatePause scheduled execution. Active version retained — re-activate with activate.
triggerManually fire a job once (does not affect schedule).
historyPrint recent execution history with status and timestamps.
deletePermanently remove a job and all its versions.

Options

OptionDescription
-i, --job-name <name>Job name. Required for most non-interactive actions.
-v, --job-version <ver>Version for deploy. Pass latest to deploy the newest.

Examples

# Interactive — pick action and target from menus
lua jobs

# List everything
lua jobs view

# Promote a specific version to active
lua jobs deploy -i dailyReport -v 1.0.3

# Promote the latest version
lua jobs deploy -i dailyReport -v latest

# Pause and resume
lua jobs deactivate -i dailyReport
lua jobs activate   -i dailyReport

# Manually trigger a job (e.g. for ad-hoc runs)
lua jobs trigger -i healthCheck

# Inspect recent runs
lua jobs history -i dailyReport

# Delete a retired job
lua jobs delete -i oldCleanupJob

Triggering vs Deploying

CommandWhen to use
lua jobs trigger -i <name>Run the job once right now. Useful for ad-hoc runs, smoke-tests after a deploy, and debugging. Schedule is untouched.
lua jobs deploy -i <name> -v <ver>Promote a different version to active. Used after lua push job lands a new version on the server.

Common Workflow

After editing a job in code:
lua push job             # Build + upload a new version
lua jobs versions -i myJob   # Confirm the new version is on the server
lua jobs deploy   -i myJob -v latest   # Promote it
lua jobs trigger  -i myJob   # Smoke-test the new version
lua jobs history  -i myJob   # Verify it ran cleanly

Logs and Errors

To debug job execution, pair this with lua logs:
lua logs --type job --name myJob --limit 20
lua logs --type job --name myJob --limit 20 --json | jq