I have python script that checks if the server is up or down, and if it's down it sends out an email along with few system logs. 
What I want is to keep checking for the server every 5 minutes, so I put the cronjob as follows:
*/5 * * * * /python/uptime.sh
So whenever the server's down, it sends an email. But I want the script to stop executing (sending more emails) after the first one. 
Can anyone help me out with how to do this? 
Thanks.
Simple solution is, you can set some Bash env variable MONITORING=true and let your python script to check that variable using os.environ["MONITORING"]. If that variable is true then check if the server is up or down else don't check anything. Once server down is found, set that variable to false from script like os.environ["MONITORING"] = false. So it won't send emails until you set that env variable again true.
Running cronjob every 5 minutes but stopped after first execution?