# AutoRefresh

**URL:** <https://community.ofelia.com/t/autorefresh/11602>\
**Category:** Q&A\
**Created:** [15 August 2023 20:54 UTC](https://community.ofelia.com/t/autorefresh/11602 "2023-08-15T20:54:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![DrakunDry](https://dub1.discourse-cdn.com/flex013/user_avatar/community.ofelia.com/drakundry/32/1214_2.png) [@DrakunDry](https://community.ofelia.com/u/DrakunDry)\
**Post date:** [15 August 2023 20:54 UTC](https://community.ofelia.com/t/autorefresh/11602/1 "2023-08-15T20:54:31Z")

</div>

HEllo I'm trying to implement autorefresh request but it doesn't work

first variable : autorefresh (type string, default value 0)

2nd : create a variable refreshVal (javaScript Expression)

```shell

setInterval(function(){  
&nbsp;&nbsp;&nbsp; $data.autorefresh = new Date().getTime();  
&nbsp;&nbsp;&nbsp; console.log($data.autorefresh);  
},6000);  
&nbsp;  
return $data.autorefresh;

```

but on page when i show it does not refresh

Any idea ?

my target is to do this : https://documentation.bonitasoft.com/bonita/latest/pages-and-forms/variables#\_call\_a\_rest\_api\_regularly\_auto\_refresh
