# at jobs

### Use at: &#x20;

Syntax:

```bash
at <date> - This will run the command at the specified time/date 
```

Example:

```bash
at 12:30am Aug 20 
```

**After this command you will be prompted to enter the commands that you want to run:**  &#x20;

### How to schedule a job:&#x20;

1. Check the date with the `date` command in Linux to get the time&#x20;
2. Schedule the job &#x20;

#### 2.1 Schedule Job from File/Script: &#x20;

&#x20; Syntax:

```bash
at –vf <path/to/script/and/script/name.sh> <time>  
```

Flags:

```bash
-f = takes file to execute (script) 
-v = displays date when the job will be executed 
```

Example:

```bash
at -vf path/to/script now 
```

&#x20;

#### 2.2 Schedule Job from Command: &#x20;

Syntax:&#x20;

```bash
at <time>  
```

This will open a prompt for input&#x20;

• Enter command / commands you want to run  • Once finished press CTRL + D    &#x20;

### Check if the job is scheduled:&#x20;

&#x20; Command:&#x20;

```bash
atq 
```

This will display the job schedule number first, the date when it will execute second and the user under which this executes third.  &#x20;

### Removing incorrect job:&#x20;

&#x20; If the job is not scheduled correctly, you can remove this with:  Command:&#x20;

```bash
atrm <jobnumber> 
```

Example:   The job scheduled below is the job with number 36  To remove the job the command used was: atrm 36  After executing this command, you can check if it was removed with `atq`&#x20;

&#x20;

### Extra Info:&#x20;

To schedule a job 1h from now you can use the following command:&#x20;

```bash
at –vf </path/to/script.sh> now + 1 hour 
```

Check the content of a Job:&#x20;

```bash
at –c <job_number>
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.arkannis.net/os/linux/at-jobs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
