In addition to crontab, does linux have the command that runs automatically every x minutes-Linux general technology-Linux technology and application information? For details, refer to the following. [I = s] This post was last edited by dchwlinux
I am running wine thunder in ubuntu, and it is still okay, that is, the old crash. Fortunately, resumable upload can be performed. So I set it to automatically start downloading after it is started, and then try to keep thunder running. Initially, the crontab tool was used, but it was found inconvenient and inflexible. So I want to write a shell. Finally, I tried to use the read-t wait function to detect the crash of thunder every other minute. I would like to ask if there are other methods to detect the crash of thunder at any time, or, you can suggest improvements to my shell.
CODE :#! /Bin/bash
######## This file is used to restart the file after the crash of thunder so that it can be continuously downloaded until the download is complete. ###### Clear T = 0 Time = 'date | awk' {print $5 }'' Echo-e "\ t is now $ time, thunder starts running \ n" While ["$ I "! = "0"] Do Name = '/bin/ps aux | grep Thunder | grep Pro | awk' {print $1 }'' If ["$ name "! = "'Whoam'"]; then ~ /Thunder. sh>/dev/null 2> & 1 &#~ /Thunder. sh is the script for wine to start Thunder. If [$ t! = 0]; then Echo-e "thunder crashed once at 'date | awk' {print $5. "| Tee-a/home/davids/crash_thunder.txt Fi Fi Echo-e "\ n \ t has been downloaded for $ t minutes. " Echo-e "\ t please close thunder after entering 0 :" T = $ ($ t + 1 )) Read-t 60-p "'echo-e' \ t \ t'" I Done Echo-e "\ t is now 'date | awk' {print $5 }'', \ n \ t thunder starts at $ time. \ N \ t ** can close thunder. ** :) \ N" |