> ## Documentation Index
> Fetch the complete documentation index at: https://docs.infraudit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# infraudit job — scheduled automation job commands

> infraudit job list, create, run, history — manage scheduled drift and compliance jobs. Key flags: --type drift_detection|resource_sync, --schedule cron.

The `job` command group manages scheduled automation jobs. Jobs run InfraAudit operations — such as drift detection, resource syncs, and compliance checks — on a cron schedule or on demand.

## `job list`

List all configured jobs:

```bash theme={null}
infraudit job list
```

Example output:

```
ID  NAME                  TYPE               SCHEDULE      LAST RUN          STATUS
--  ----                  ----               --------      --------          ------
1   Daily Drift Scan      drift_detection    0 8 * * *     2 hours ago       success
2   Hourly Resource Sync  resource_sync      0 * * * *     45 minutes ago    success
```

## `job create`

Create a new scheduled job. The CLI prompts interactively if flags are not provided.

**Synopsis:**

```bash theme={null}
infraudit job create [flags]
```

| Flag         | Description                                |
| ------------ | ------------------------------------------ |
| `--name`     | Display name for the job                   |
| `--type`     | Job type (see supported types below)       |
| `--schedule` | Cron expression defining when the job runs |

Supported job types:

| Type                 | Description                                      |
| -------------------- | ------------------------------------------------ |
| `drift_detection`    | Run drift detection across all resources         |
| `resource_sync`      | Sync resource inventory from all providers       |
| `vulnerability_scan` | Run a vulnerability scan                         |
| `cost_sync`          | Pull billing data from all providers             |
| `compliance_check`   | Run all enabled compliance framework assessments |

Examples:

```bash theme={null}
# Create a daily drift scan at 8:00 AM UTC
infraudit job create --name "Daily Drift Scan" --type drift_detection --schedule "0 8 * * *"

# Create an hourly resource sync
infraudit job create --name "Hourly Sync" --type resource_sync --schedule "0 * * * *"
```

## `job get`

Show details for a specific job, including its schedule, type, and last execution result:

**Synopsis:**

```bash theme={null}
infraudit job get <job-id>
```

Example:

```bash theme={null}
infraudit job get 1
```

## `job run`

Trigger an immediate execution of a job, regardless of its schedule:

**Synopsis:**

```bash theme={null}
infraudit job run <job-id>
```

Example:

```bash theme={null}
infraudit job run 1
```

## `job history`

Show the execution history for a job, including start time, duration, and result for each run:

**Synopsis:**

```bash theme={null}
infraudit job history <job-id>
```

Example:

```bash theme={null}
infraudit job history 1
```

## `job executions`

Alias for `job history`. Lists execution records for a specific job:

```bash theme={null}
infraudit job executions 1
```

## `job delete`

Remove a job. Execution history is retained:

```bash theme={null}
infraudit job delete 1
```

## `job types`

List all available job types:

```bash theme={null}
infraudit job types
```
