Hi I am trying to use callback function that updated my page layout every day. I am using Dcc.Interval and everything seems to work fine except when I refresh the page. When the page is refreshed the callback function is being called every time.
My code looks like this:
app.layout = html.Div(children=[
...
html.Div(id='dashboard'),
dcc.Interval(
id='interval-component',
interval=128*675000, # one day in millis (86400000ms)
n_intervals=0
)
], style={'padding': '35px 65px 20px 65px', 'background-color' : '#f9fbfd'})
...
@app.callback(
Output(component_id='dashboard', component_property='children'),
[Input('interval-component', 'n_intervals')]
)
def update_graphs_live(n_intervals):
......
So I want the callback function to be called once a day…