Spaces:
Sleeping
Sleeping
# Generate a random sleep time between 20 and 40 hours (in seconds) | |
sleep_time=$(( (RANDOM % 144000) + 72000 )) | |
# Sleep for the generated time | |
sleep $sleep_time | |
# Restart the application | |
pkill -f 'python3 server.py' | |
pkill -f 'python3 code.py' | |
# Execute the CMD again to restart the application | |
exec "$@" | |