run-script-in-background / your_script.py
nateraw's picture
Create your_script.py
0d02ac5
raw
history blame
262 Bytes
import time
# Open the file in append mode
with open("outputs/message.txt", "a") as file:
# Loop 60 times
for i in range(60):
# Append the value of i to the file
file.write(str(i) + "\n")
# Wait for 1 second
time.sleep(1)