Spaces:
Runtime error
Runtime error
huggingface112
commited on
Commit
•
2fa926a
1
Parent(s):
5fd74e2
added daily update script
Browse files- backgroundTask.py +16 -0
backgroundTask.py
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import sys
|
2 |
+
sys.path.append('/Users/lamonkey/Desktop/portfolio_management')
|
3 |
+
from pipeline import daily_update
|
4 |
+
import panel as pn
|
5 |
+
from datetime import timedelta
|
6 |
+
|
7 |
+
|
8 |
+
pn.state.schedule_task(
|
9 |
+
'daily_update', daily_update, period=timedelta(hours=24)
|
10 |
+
)
|
11 |
+
# pn.state.schedule_task(
|
12 |
+
# 'task', run, period=timedelta(seconds=3)
|
13 |
+
# )
|
14 |
+
|
15 |
+
# update stock price and benchmark profile
|
16 |
+
# update()
|