# Task variables

In the fields of a job's tasks, a name in braces is replaced by a value when the task runs: `{name}` is the name of the file in hand, `{now}` the time. How they work, with examples, is in [Variables](Jobs-Variables.md).

This page is the index: every variable that the pages of this wiki describe, 101 of them, by the alphabet, with the page that has the detail. The variables of the server itself, which also work in jobs, are in [Server variables](Ref-Server-Variables.md).

## Kinds of variable

| Kind | Examples | Described in |
|---|---|---|
| the file in hand | `{name}`, `{path}`, `{size}`, `{url}` | [Variables: the file in hand](Jobs-Variables.md#the-file-in-hand) |
| the run | `{scheduleName}`, `{job_id}`, `{items_count}` | [Variables: the run](Jobs-Variables.md#the-run) |
| errors | `{task_error}` and its relatives | [Variables: errors](Jobs-Variables.md#errors) |
| dates and times | `{now}`, `{yyyy}`, `{MM}`, `{dd}` | [Variables: dates and times](Jobs-Variables.md#dates-and-times) |
| what a task hands on | each task's own, such as the answer of an HTTP call | the task's page, under "What it hands on" |
| the user of an event | `{user_name}` and every field of the user | [Variables: the user of an event](Jobs-Variables.md#the-user-of-an-event) |
| your own | whatever a [UserVariable task](Task-UserVariable.md) sets | [Variables of your own](Jobs-Variables.md#variables-of-your-own) |

Any field of the item can be used as a variable by its name, also those a task added. To see what an item holds at some point of a job, write `{all}` into a mail or a log line there, or use the test in [Variables: trying a variable](Jobs-Variables.md#trying-a-variable).

Jump to: [A](#a) [B](#b) [C](#c) [D](#d) [E](#e) [F](#f) [H](#h) [I](#i) [J](#j) [L](#l) [M](#m) [N](#n) [O](#o) [P](#p) [R](#r) [S](#s) [T](#t) [U](#u) [V](#v) [W](#w) [Y](#y)

## 0-9

| Variable | Is | Described in |
|---|---|---|
| `{_MM}` | when the transfer of the file ended (events) | [Variables](Jobs-Variables.md) |

## A

| Variable | Is | Described in |
|---|---|---|
| `{amount}` | `250.00` | [FileParser task](Task-FileParser.md) |

## B

| Variable | Is | Described in |
|---|---|---|
| `{bias}` | `pull-up`, `pull-down` or `disable` | [RaspberryPi task](Task-RaspberryPi.md) |
| `{body}` | of the message | [PopImap task](Task-PopImap.md) |

## C

| Variable | Is | Described in |
|---|---|---|
| `{customer}` | `ACME` | [FileParser task](Task-FileParser.md) |

## D

| Variable | Is | Described in |
|---|---|---|
| `{D}` | day of the year | [Variables](Jobs-Variables.md) |
| `{dd}` | day | [Variables](Jobs-Variables.md) |
| `{dns_challenge_domain}` | the name the record is for | [Let's Encrypt by DNS](Plugin-LetsEncrypt-DNS.md) |
| `{dns_challenge_token}` | the value to put into the TXT record | [Let's Encrypt by DNS](Plugin-LetsEncrypt-DNS.md) |
| `{drive}` | `dh` or `dl` | [RaspberryPi task](Task-RaspberryPi.md) |

## E

| Variable | Is | Described in |
|---|---|---|
| `{EEE}` | Fri, Friday | [Variables](Jobs-Variables.md) |
| `{EEEE}` | Fri, Friday | [Variables](Jobs-Variables.md) |
| `{ext}` | the ending, with its dot | [Variables](Jobs-Variables.md), [Execute task](Task-Execute.md) |

## F

| Variable | Is | Described in |
|---|---|---|
| `{fetched}` | Equals | [Jump task](Task-Jump.md) |
| `{from}` | the sender's address | [PopImap task](Task-PopImap.md) |
| `{from_prefix}` | the part of it before the @ | [PopImap task](Task-PopImap.md) |
| `{full_log}` | the log of this run so far, the last megabyte of it: for the mail that reports a failure | [Variables](Jobs-Variables.md) |

## H

| Variable | Is | Described in |
|---|---|---|
| `{header_date}` | from the message's headers | [PopImap task](Task-PopImap.md) |
| `{header_message_id}` | from the message's headers | [PopImap task](Task-PopImap.md) |
| `{header_received}` | the path the message took, and the sender's address where the headers say it | [PopImap task](Task-PopImap.md) |
| `{header_reply_to}` | from the message's headers | [PopImap task](Task-PopImap.md) |
| `{header_return_path}` | from the message's headers | [PopImap task](Task-PopImap.md) |
| `{header_source_ip}` | the path the message took, and the sender's address where the headers say it | [PopImap task](Task-PopImap.md) |
| `{header_x_forwarded_for}` | the path the message took, and the sender's address where the headers say it | [PopImap task](Task-PopImap.md) |
| `{header_x_originating_ip}` | the path the message took, and the sender's address where the headers say it | [PopImap task](Task-PopImap.md) |
| `{HH}` | Less Than | [Jump task](Task-Jump.md) |
| `{hostname}` | the name of the machine | [Variables](Jobs-Variables.md) |
| `{http_response_code}` | 200, 404 … | [HTTP task](Task-HTTP.md) |
| `{http_response_log}` | the body of the answer | [HTTP task](Task-HTTP.md) |
| `{http_response_message}` | the text beside the code | [HTTP task](Task-HTTP.md) |

## I

| Variable | Is | Described in |
|---|---|---|
| `{item_count}` | how many items the list has | [Variables](Jobs-Variables.md) |
| `{items_count}` | how many items the list has | [Variables](Jobs-Variables.md), [Jump task](Task-Jump.md) |
| `{iteration}` | the count of tries, in a task that retries | [Variables](Jobs-Variables.md) |

## J

| Variable | Is | Described in |
|---|---|---|
| `{job_id}` | the id of this run | [Variables](Jobs-Variables.md) |

## L

| Variable | Is | Described in |
|---|---|---|
| `{line}` | the whole line | [FileParser task](Task-FileParser.md) |
| `{loop_elapsed}` | how long the loop has been running | [Loop task](Task-Loop.md) |
| `{loop_first}` | `true` in the first and in the last pass | [Loop task](Task-Loop.md) |
| `{loop_index}` | the pass, from 0 | [Loop task](Task-Loop.md) |
| `{loop_last}` | `true` in the first and in the last pass | [Loop task](Task-Loop.md) |
| `{loop_number}` | the pass, from 1 | [Loop task](Task-Loop.md) |
| `{loop_total}` | how many passes there will be, where that is known: for each item and for a number of times | [Loop task](Task-Loop.md) |

## M

| Variable | Is | Described in |
|---|---|---|
| `{mail_index}` | the number of the message in this run | [PopImap task](Task-PopImap.md) |
| `{mail_type}` | whether the file is an attachment or the body | [PopImap task](Task-PopImap.md) |
| `{md5}` | the file's checksum, where a task worked it out | [Variables](Jobs-Variables.md) |
| `{millis}` | the time as milliseconds | [Variables](Jobs-Variables.md) |
| `{MM}` | month, 01-12 | [Variables](Jobs-Variables.md) |
| `{MM_}` | when the transfer of the file began (events) | [Variables](Jobs-Variables.md) |
| `{MMM}` | Nov, November | [Variables](Jobs-Variables.md) |
| `{MMMM}` | Nov, November | [Variables](Jobs-Variables.md) |

## N

| Variable | Is | Described in |
|---|---|---|
| `{name}` | the file's name | [Variables](Jobs-Variables.md), [Execute task](Task-Execute.md) |
| `{now}` | the time as milliseconds | [Variables](Jobs-Variables.md) |

## O

| Variable | Is | Described in |
|---|---|---|
| `{order}` | `1001` | [FileParser task](Task-FileParser.md) |

## P

| Variable | Is | Described in |
|---|---|---|
| `{parent_path}` | the folder | [Variables](Jobs-Variables.md) |
| `{parent_url}` | the address of the folder | [Variables](Jobs-Variables.md) |
| `{path}` | the folder and name on that server | [Variables](Jobs-Variables.md) |
| `{pin}` | the GPIO number | [RaspberryPi task](Task-RaspberryPi.md) |
| `{pin_list}` | all pins to read, as separate arguments | [RaspberryPi task](Task-RaspberryPi.md) |
| `{pins}` | all pins to read, as `17,27` | [RaspberryPi task](Task-RaspberryPi.md) |
| `{protocol}` | the kind of address | [Variables](Jobs-Variables.md) |
| `{pull}` | `pu`, `pd` or `pn` | [RaspberryPi task](Task-RaspberryPi.md) |

## R

| Variable | Is | Described in |
|---|---|---|
| `{real_parent_path}` | for `file://` items, the path as the operating system writes it | [Variables](Jobs-Variables.md), [Execute task](Task-Execute.md) |
| `{real_path}` | for `file://` items, the path as the operating system writes it | [Variables](Jobs-Variables.md), [Execute task](Task-Execute.md) |
| `{row}` | `1` | [FileParser task](Task-FileParser.md) |

## S

| Variable | Is | Described in |
|---|---|---|
| `{schedule_name}` | the job's name | [Variables](Jobs-Variables.md) |
| `{scheduleName}` | the job's name | [Variables](Jobs-Variables.md) |
| `{scheduleNote}` | the job's note | [Variables](Jobs-Variables.md) |
| `{session_log}` | the log of the user's session, the last megabyte of it | [Variables](Jobs-Variables.md) |
| `{size}` | the size in bytes, and as "1.2 MB" | [Variables](Jobs-Variables.md), [Jump task](Task-Jump.md) |
| `{size_formatted}` | the size in bytes, and as "1.2 MB" | [Variables](Jobs-Variables.md) |
| `{stem}` | the name without its last ending | [Variables](Jobs-Variables.md), [Execute task](Task-Execute.md) |
| `{subject}` | of the message | [PopImap task](Task-PopImap.md) |

## T

| Variable | Is | Described in |
|---|---|---|
| `{task_error}` | the error of the task that failed last | [Variables](Jobs-Variables.md), [Jump task](Task-Jump.md) |
| `{task_error_name}` | the name of the task that failed last | [Variables](Jobs-Variables.md) |
| `{task_error_names}` | the names of all tasks that failed, with commas | [Variables](Jobs-Variables.md) |
| `{task_errors}` | all errors of the run so far, one per line | [Variables](Jobs-Variables.md) |
| `{taskName}` | the name of the task that is running | [Variables](Jobs-Variables.md) |
| `{the_file_error}` | the speed of the transfer, and the error if it failed | [The event editor](Users-Events-Editor.md) |
| `{the_file_name}` | name and folder of a file, inside `<LINE>` | [The event editor](Users-Events-Editor.md) |
| `{the_file_path}` | name and folder of a file, inside `<LINE>` | [The event editor](Users-Events-Editor.md) |
| `{the_file_size}` | its size in bytes, and as a readable size such as "1.2 MB" | [The event editor](Users-Events-Editor.md) |
| `{the_file_size_formatted}` | its size in bytes, and as a readable size such as "1.2 MB" | [The event editor](Users-Events-Editor.md) |
| `{the_file_speed}` | the speed of the transfer, and the error if it failed | [The event editor](Users-Events-Editor.md) |
| `{thread_dump}` | what every thread of the server is doing, for the support | [Variables](Jobs-Variables.md) |
| `{time}` | the time as milliseconds | [Variables](Jobs-Variables.md) |
| `{type}` | `FILE` or `DIR` | [Variables](Jobs-Variables.md) |

## U

| Variable | Is | Described in |
|---|---|---|
| `{u}` | day of the week as a number | [Variables](Jobs-Variables.md) |
| `{url}` | the whole address. A password in it is left out. | [Variables](Jobs-Variables.md), [The event editor](Users-Events-Editor.md) |
| `{user_email}` | from the user's account | [Variables](Jobs-Variables.md), [UsersList task](Task-UsersList.md) |
| `{user_first_name}` | from the user's account | [Variables](Jobs-Variables.md), [UsersList task](Task-UsersList.md) |
| `{user_ip}` | where they came from, and how | [Variables](Jobs-Variables.md) |
| `{user_last_name}` | from the user's account | [Variables](Jobs-Variables.md), [UsersList task](Task-UsersList.md) |
| `{user_name}` | the login name. For a name like an e-mail address, `{user_name_at0}` is the part before the @ and `{user_name_at1}` the part after. | [Variables](Jobs-Variables.md), [UsersList task](Task-UsersList.md) |
| `{user_phone}` | from the user's account | [Variables](Jobs-Variables.md), [UsersList task](Task-UsersList.md) |
| `{user_protocol}` | where they came from, and how | [Variables](Jobs-Variables.md) |
| `{user_time}` | the time the event ran | [The event editor](Users-Events-Editor.md) |

## V

| Variable | Is | Described in |
|---|---|---|
| `{value}` | 1 or 0 | [RaspberryPi task](Task-RaspberryPi.md) |

## W

| Variable | Is | Described in |
|---|---|---|
| `{w}` | week of the year, of the month | [Variables](Jobs-Variables.md) |
| `{W}` | week of the year, of the month | [Variables](Jobs-Variables.md) |
| `{working_dir}` | the server's folder | [Variables](Jobs-Variables.md) |

## Y

| Variable | Is | Described in |
|---|---|---|
| `{yy}` | year | [Variables](Jobs-Variables.md) |
| `{yyyy}` | year | [Variables](Jobs-Variables.md) |

## Functions

A value can be changed on the way: cut, replaced, counted with. Those are functions: [Task functions](Ref-Task-Functions.md).

## Where this list comes from

The index is gathered from the pages of this wiki: the variables page and the page of every task. A variable that a task sets and its page does not name is not here; `{all}` shows such a one on a real run.
