Spaces:
Sleeping
Sleeping
BarngSJ
commited on
Commit
·
d36b4bb
1
Parent(s):
2b6767e
new
Browse files
app.py
CHANGED
@@ -6,11 +6,11 @@ import threading
|
|
6 |
|
7 |
# Function to execute your scripts
|
8 |
def job():
|
9 |
-
st.write("
|
10 |
subprocess.run(["python", "scrap_data_from_FN.py"])
|
11 |
time.sleep(20)
|
12 |
subprocess.run(["python", "run_at_morning.py"])
|
13 |
-
st.write("
|
14 |
|
15 |
# Schedule the job at 04:00 AM daily
|
16 |
schedule.every().day.at("04:00").do(job)
|
@@ -25,10 +25,10 @@ def run_scheduler():
|
|
25 |
threading.Thread(target=run_scheduler, daemon=True).start()
|
26 |
|
27 |
# Streamlit UI
|
28 |
-
st.title("
|
29 |
-
st.write("
|
30 |
|
31 |
-
if st.button("
|
32 |
job()
|
33 |
-
st.success("
|
34 |
|
|
|
6 |
|
7 |
# Function to execute your scripts
|
8 |
def job():
|
9 |
+
st.write("スクリプト実行完了")
|
10 |
subprocess.run(["python", "scrap_data_from_FN.py"])
|
11 |
time.sleep(20)
|
12 |
subprocess.run(["python", "run_at_morning.py"])
|
13 |
+
st.write("作業完了")
|
14 |
|
15 |
# Schedule the job at 04:00 AM daily
|
16 |
schedule.every().day.at("04:00").do(job)
|
|
|
25 |
threading.Thread(target=run_scheduler, daemon=True).start()
|
26 |
|
27 |
# Streamlit UI
|
28 |
+
st.title("FN スクレイピングアプリ")
|
29 |
+
st.write("アプリは午前4時に自動で回るように設定されています。")
|
30 |
|
31 |
+
if st.button("実行"):
|
32 |
job()
|
33 |
+
st.success("手動実行")
|
34 |
|