File size: 470 Bytes
3c3e72b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import time

def keep_alive():
    """
    Keeps the Space alive by printing a message every 30 seconds.
    """
    print("Starting keep-alive loop. Press Ctrl+C to exit.")
    try:
        while True:
            # This print statement is what keeps the process active.
            print("🚀 Keeping the Space alive...")
            time.sleep(30)
    except KeyboardInterrupt:
        print("\nExiting keep-alive loop.")

if __name__ == "__main__":
    keep_alive()