# Send-email: variable for duration?

**URL:** https://forum.duplicati.com/t/send-email-variable-for-duration/9130
**Category:** Support
**Created:** [February 8, 2020, 12:11pm UTC](https://forum.duplicati.com/t/send-email-variable-for-duration/9130 "2020-02-08T12:11:52Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![StefanS](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/s/9d8465/32.png) [@StefanS](https://forum.duplicati.com/u/StefanS)
#### Post date: [February 8, 2020, 12:11pm UTC](https://forum.duplicati.com/t/send-email-variable-for-duration/9130/1 "2020-02-08T12:11:53Z")

</div>

Does a variable exist to include the backup duration to the email body?

Alternatively StartTime and EndTime of the backup?

---

<div class="post-metadata">

### Author: ![drwtsn32](https://forum.duplicati.com/user_avatar/forum.duplicati.com/drwtsn32/32/2591_2.png) [@drwtsn32](https://forum.duplicati.com/u/drwtsn32)
#### Post date: [February 8, 2020, 2:12pm UTC](https://forum.duplicati.com/t/send-email-variable-for-duration/9130/2 "2020-02-08T14:12:09Z")

</div>

Welcome to the forum!

No, there is no environment variable that represents backup duration. This could probably be added without too much difficulty. If you really would like this feature, feel free to submit a suggestion request in the Github Issues area: [Issues · duplicati/duplicati · GitHub](https://github.com/duplicati/duplicati/issues)

In the meantime, an alternative solution I could suggest is to use the excellent third party [duplicati-monitoring.com](http://duplicati-monitoring.com) site. You can quickly see status and reports for all your Duplicati backups in a nice UI. Here’s a sample that shows backup durations for my backups:

 ![Capture](https://forum.duplicati.com/uploads/default/original/2X/a/a6b8228e6d7c143904e9383beabcf12fd85ce108.png)

---

<div class="post-metadata">

### Author: ![StefanS](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/s/9d8465/32.png) [@StefanS](https://forum.duplicati.com/u/StefanS)
#### Post date: [February 8, 2020, 6:30pm UTC](https://forum.duplicati.com/t/send-email-variable-for-duration/9130/3 "2020-02-08T18:30:56Z")

</div>

Thank you, @drwtsn32 for your kind response. I have made the respective feature proposal on Github:

> <https://github.com/duplicati/duplicati/issues/4091>
>
> I'd like to propose to make 3 additional environment variables available for the Send-email option, to include the backup duration, begin...

---

<div class="post-metadata">

### Author: ![ts678](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/t/8491ac/32.png) [@ts678](https://forum.duplicati.com/u/ts678)
#### Post date: [February 8, 2020, 6:41pm UTC](https://forum.duplicati.com/t/send-email-variable-for-duration/9130/4 "2020-02-08T18:41:52Z")

</div>

I’m confused about the goal. `Duration` is in the default email body along with other values, and you can even get JSON values if this is to automate processing. If customized body is needed, then all the result values can be inserted using %RESULT%. See [–send-mail-body](https://duplicati.readthedocs.io/en/latest/06-advanced-options/#send-mail-body). What’s awkward is extreme tailoring…

> <https://github.com/duplicati/duplicati/blob/44f619b725bb8b511a5ef27db46bec91072bdf5f/Duplicati/Library/Modules/Builtin/run-script-example.bat#L188-L189>

is an example which could probably be worked into ultimate extreme customization, if that was required.

Will any of the above help?

---

<div class="post-metadata">

### Author: ![StefanS](https://forum.duplicati.com/letter_avatar_proxy/v4/letter/s/9d8465/32.png) [@StefanS](https://forum.duplicati.com/u/StefanS)
#### Post date: [February 8, 2020, 6:51pm UTC](https://forum.duplicati.com/t/send-email-variable-for-duration/9130/5 "2020-02-08T18:51:01Z")

</div>

I currently use %RESULT% as workaround. However, %RESULT% create extensive amount of additonal, mostly undesired details.

---

<div class="post-metadata">

### Author: ![drwtsn32](https://forum.duplicati.com/user_avatar/forum.duplicati.com/drwtsn32/32/2591_2.png) [@drwtsn32](https://forum.duplicati.com/u/drwtsn32)
#### Post date: [February 8, 2020, 11:26pm UTC](https://forum.duplicati.com/t/send-email-variable-for-duration/9130/6 "2020-02-08T23:26:22Z")

</div>

You could potentially do some text parsing in your batch script to extract what you’re interested in from %RESULT%
