[**Documentation**](../../../../../README)

***

[Documentation](../../../../../README) / [@zerotal/core](../../../README) / [command/builtin](../README) / MakeJobCommand

# Class: MakeJobCommand

Defined in: [command/builtin/MakeJobCommand.ts:11](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/core/src/command/builtin/MakeJobCommand.ts#L11)

`bun zt make:job <name>` — scaffolds a new queue job class under `app/jobs/`.

## Extends

- [`Command`](../../../index/classes/Command)

## Constructors

### Constructor

> **new MakeJobCommand**(): `MakeJobCommand`

#### Returns

`MakeJobCommand`

#### Inherited from

[`Command`](../../../index/classes/Command).[`constructor`](../../../index/classes/Command#constructor)

## Properties

### flags

> `static` **flags**: [`FlagDef`](../../../index/type-aliases/FlagDef)[] = `[]`

Defined in: [command/Command.ts:68](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/core/src/command/Command.ts#L68)

#### Inherited from

[`Command`](../../../index/classes/Command).[`flags`](../../../index/classes/Command#flags)

***

### \_writer

> **\_writer**: [`OutputWriter`](../../../index/interfaces/OutputWriter)

Defined in: [command/Command.ts:71](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/core/src/command/Command.ts#L71)

Output destination. Replaced with BufferWriter by Artisan.call().

#### Inherited from

[`Command`](../../../index/classes/Command).[`_writer`](../../../index/classes/Command#_writer)

***

### args

> **args**: `Record`\<`string`, `string`\> = `{}`

Defined in: [command/Command.ts:74](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/core/src/command/Command.ts#L74)

Parsed positional arguments — set by CommandRunner before run().

#### Inherited from

[`Command`](../../../index/classes/Command).[`args`](../../../index/classes/Command#args-1)

***

### flags

> **flags**: `Record`\<`string`, `string` \| `boolean` \| `number`\> = `{}`

Defined in: [command/Command.ts:76](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/core/src/command/Command.ts#L76)

Parsed flags — set by CommandRunner before run().

#### Inherited from

[`Command`](../../../index/classes/Command).[`flags`](../../../index/classes/Command#flags-1)

***

### app

> **app**: `unknown` = `undefined`

Defined in: [command/Command.ts:78](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/core/src/command/Command.ts#L78)

Application instance — set by CommandRunner when needsApp is true.

#### Inherited from

[`Command`](../../../index/classes/Command).[`app`](../../../index/classes/Command#app)

***

### commandName

> `static` **commandName**: `string` = `"make:job"`

Defined in: [command/builtin/MakeJobCommand.ts:12](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/core/src/command/builtin/MakeJobCommand.ts#L12)

#### Overrides

[`Command`](../../../index/classes/Command).[`commandName`](../../../index/classes/Command#commandname)

***

### description

> `static` **description**: `string` = `"Create a new queue job class"`

Defined in: [command/builtin/MakeJobCommand.ts:13](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/core/src/command/builtin/MakeJobCommand.ts#L13)

#### Overrides

[`Command`](../../../index/classes/Command).[`description`](../../../index/classes/Command#description)

***

### needsApp

> `static` **needsApp**: `boolean` = `false`

Defined in: [command/builtin/MakeJobCommand.ts:14](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/core/src/command/builtin/MakeJobCommand.ts#L14)

#### Overrides

[`Command`](../../../index/classes/Command).[`needsApp`](../../../index/classes/Command#needsapp)

***

### args

> `static` **args**: `object`[]

Defined in: [command/builtin/MakeJobCommand.ts:15](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/core/src/command/builtin/MakeJobCommand.ts#L15)

#### name

> **name**: `string` = `"name"`

#### required

> **required**: `boolean` = `true`

#### default

> **default**: `string` = `""`

#### Overrides

[`Command`](../../../index/classes/Command).[`args`](../../../index/classes/Command#args)

## Methods

### info()

> **info**(`msg`): `void`

Defined in: [command/Command.ts:82](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/core/src/command/Command.ts#L82)

#### Parameters

##### msg

`string`

#### Returns

`void`

#### Inherited from

[`Command`](../../../index/classes/Command).[`info`](../../../index/classes/Command#info)

***

### error()

> **error**(`msg`): `void`

Defined in: [command/Command.ts:85](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/core/src/command/Command.ts#L85)

#### Parameters

##### msg

`string`

#### Returns

`void`

#### Inherited from

[`Command`](../../../index/classes/Command).[`error`](../../../index/classes/Command#error)

***

### warn()

> **warn**(`msg`): `void`

Defined in: [command/Command.ts:88](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/core/src/command/Command.ts#L88)

#### Parameters

##### msg

`string`

#### Returns

`void`

#### Inherited from

[`Command`](../../../index/classes/Command).[`warn`](../../../index/classes/Command#warn)

***

### line()

> **line**(`msg`): `void`

Defined in: [command/Command.ts:91](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/core/src/command/Command.ts#L91)

#### Parameters

##### msg

`string`

#### Returns

`void`

#### Inherited from

[`Command`](../../../index/classes/Command).[`line`](../../../index/classes/Command#line)

***

### dim()

> **dim**(`msg`): `void`

Defined in: [command/Command.ts:94](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/core/src/command/Command.ts#L94)

#### Parameters

##### msg

`string`

#### Returns

`void`

#### Inherited from

[`Command`](../../../index/classes/Command).[`dim`](../../../index/classes/Command#dim)

***

### write()

> **write**(`msg`): `void`

Defined in: [command/Command.ts:97](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/core/src/command/Command.ts#L97)

#### Parameters

##### msg

`string`

#### Returns

`void`

#### Inherited from

[`Command`](../../../index/classes/Command).[`write`](../../../index/classes/Command#write)

***

### newLine()

> **newLine**(): `void`

Defined in: [command/Command.ts:100](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/core/src/command/Command.ts#L100)

#### Returns

`void`

#### Inherited from

[`Command`](../../../index/classes/Command).[`newLine`](../../../index/classes/Command#newline)

***

### section()

> **section**(`title`): `void`

Defined in: [command/Command.ts:103](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/core/src/command/Command.ts#L103)

#### Parameters

##### title

`string`

#### Returns

`void`

#### Inherited from

[`Command`](../../../index/classes/Command).[`section`](../../../index/classes/Command#section)

***

### table()

> **table**(`rows`, `indent?`): `void`

Defined in: [command/Command.ts:106](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/core/src/command/Command.ts#L106)

#### Parameters

##### rows

\[`string`, `string`\][]

##### indent?

`number` = `2`

#### Returns

`void`

#### Inherited from

[`Command`](../../../index/classes/Command).[`table`](../../../index/classes/Command#table)

***

### ask()

> **ask**(`question`, `defaultValue?`): `Promise`\<`string`\>

Defined in: [command/Command.ts:127](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/core/src/command/Command.ts#L127)

Prompt the user for text input and wait for Enter.

#### Parameters

##### question

`string`

##### defaultValue?

`string`

#### Returns

`Promise`\<`string`\>

#### Example

```ts
const name = await this.ask('What is your name?');
const env  = await this.ask('Environment?', 'production');
```

#### Inherited from

[`Command`](../../../index/classes/Command).[`ask`](../../../index/classes/Command#ask)

***

### confirm()

> **confirm**(`question`, `defaultValue?`): `Promise`\<`boolean`\>

Defined in: [command/Command.ts:142](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/core/src/command/Command.ts#L142)

Prompt the user for a yes/no confirmation.
Returns true for y/yes, false otherwise.

#### Parameters

##### question

`string`

##### defaultValue?

`boolean` = `false`

#### Returns

`Promise`\<`boolean`\>

#### Example

```ts
const ok = await this.confirm('Run migrations?');
const ok = await this.confirm('Overwrite file?', true);
```

#### Inherited from

[`Command`](../../../index/classes/Command).[`confirm`](../../../index/classes/Command#confirm)

***

### choice()

> **choice**(`question`, `options`): `Promise`\<`string`\>

Defined in: [command/Command.ts:157](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/core/src/command/Command.ts#L157)

Prompt the user to select one option from a numbered list.
Returns the selected string. Defaults to the first option on invalid input.

#### Parameters

##### question

`string`

##### options

`string`[]

#### Returns

`Promise`\<`string`\>

#### Example

```ts
const env = await this.choice('Environment:', ['local', 'staging', 'production']);
```

#### Inherited from

[`Command`](../../../index/classes/Command).[`choice`](../../../index/classes/Command#choice)

***

### secret()

> **secret**(`question`): `Promise`\<`string`\>

Defined in: [command/Command.ts:170](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/core/src/command/Command.ts#L170)

#### Parameters

##### question

`string`

#### Returns

`Promise`\<`string`\>

#### Inherited from

[`Command`](../../../index/classes/Command).[`secret`](../../../index/classes/Command#secret)

***

### \_readLine()

> **\_readLine**(): `Promise`\<`string`\>

Defined in: [command/Command.ts:213](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/core/src/command/Command.ts#L213)

Read one line from stdin. Override in tests to avoid blocking.

#### Returns

`Promise`\<`string`\>

#### Inherited from

[`Command`](../../../index/classes/Command).[`_readLine`](../../../index/classes/Command#_readline)

***

### run()

> **run**(): `Promise`\<`void`\>

Defined in: [command/builtin/MakeJobCommand.ts:17](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/core/src/command/builtin/MakeJobCommand.ts#L17)

#### Returns

`Promise`\<`void`\>

#### Overrides

[`Command`](../../../index/classes/Command).[`run`](../../../index/classes/Command#run)
