How do I close the terminal but keep a scheduled script running? It works for seconds, minutes with the terminal opened but terminates when the terminal is closed. Is there a way of working around it?
from schedule import every, repeat, run_pending
import time
@repeat(every(30).days.at("11:30"))
def auto_run_task():
"""Auto run task in every 30days to update CSV files."""
print("Auto run task activated.")
update_csv_file()
print("file updated successfully")
while True:
run_pending()
time.sleep(1)