# setDatanodeRestartInterval {#setdatanoderestartinterval}

**Parent topic:**[Functions](../../Functions/category.md)

## Syntax {#syntax-1}

`setDatanodeRestartInterval(interval)`

## Arguments {#arguments}

**interval** is a non-negative integer \(in seconds\).

## Details {#details}

Modify *datanodeRestartInterval* online. This command can only be executed by an administrator on the controller.

-   If *interval*=0, the controller will not automatically restart the data/compute node.

-   If *interval*&gt;0, the controller will restart the data/compute node after *datanodeRestartInterval* of offline time.


**Note:** The modified configuration is only valid for the current node, and will expire after the system restarts. To make it permanent, please change the configuration parameter *datanodeRestartInterval.*

Related function: [getDatanodeRestartInterval](../g/getdatanoderestartinterval.md)

