User Tools

Site Tools


process_check_script_for_cron

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
process_check_script_for_cron [2012/04/06 15:09]
k2patel
process_check_script_for_cron [2012/04/06 15:12]
k2patel [Third]
Line 3: Line 3:
 This script will check process if it is not running ​ This script will check process if it is not running ​
 and will start the process if not running. and will start the process if not running.
 +
 +==== First ====
  
 <code bash | proc_script.sh>​ <code bash | proc_script.sh>​
Line 17: Line 19:
 fi fi
 </​code>​ </​code>​
 +
 +==== Second ====
  
 I made some changes as there is actually no need to equality check: I made some changes as there is actually no need to equality check:
 +
  
 <code bash | proc_scriptjt.sh>​ <code bash | proc_scriptjt.sh>​
Line 33: Line 38:
 fi fi
 </​code>​ </​code>​
 +
 +==== Third ====
 +
  
 This is in python :) This is in python :)
Line 40: Line 48:
 # -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
 """​ """​
-Created on Wed Apr  4 14:​46:​52 ​2012+Created on Thu Aug  4 14:​46:​52 ​2011
  
 @author: k2patel@hotmail.com @author: k2patel@hotmail.com
Line 48: Line 56:
 import psutil import psutil
  
-#procfs.utilist()+reset running variable
 running = 0 running = 0
-#psutil.+
  
 for proc in psutil.get_process_list():​ for proc in psutil.get_process_list():​
process_check_script_for_cron.txt ยท Last modified: 2020/08/10 02:35 (external edit)