---
title: "AutoSaveOptions"
slug: "api/project/types/autosaveoptions"
sidebar:
  order: 542
---

<a id="ref-08ddbb2fb336"></a>
<a id="ref-476d9b59fe5e"></a>
<a id="ref-42cc348681e2"></a>

## Synopsis

```text
struct AutoSaveOptions (
    boolean onSessionClose,
    boolean onProjectClose,
    boolean periodical,
    duration interval,
    duration idleTime
)
```

See also: duration *(unresolved source reference)*

**onSessionClose**

If true, automatically save the project when the session is closed (default false)

**periodical**

If true, periodically save the project (default false)

**interval**

\<iso-8601-duration\> the time between two periodical auto-saves (default PT10M, minimum PT1M)

**idleTime**

\<iso-8601-duration\>  the time a session must have been idle before a periodical auto- save kicks in (default PT10S, minimum PT2S)

**`onProjectClose`**

Auto-save the project (The default value is false) Can also be enabled with the startup file option. From the point of view of the current web service API a project is closed after a new project has been successfully opened by one of the following operations:

     SessionWebService: [loadSession](/api/session/operations/loadsession#ref-dcf6596732bf), [loadEmptySession](/api/session/operations/loademptysession#ref-e9ce1f7452bd)\
     ProjectWebService: [newProject](/api/project/operations/newproject#ref-1a2893effc48), [loadProject](/api/project/operations/loadproject#ref-d2aff957f1ee)
