Shell script to run all the python scripts from particular directory


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Shell script to run all the python scripts from particular directory
# 1  
Old 05-08-2012
Lightbulb Shell script to run all the python scripts from particular directory

I have N number of python scripts which i am receiving from REST web server and i am saving them in /home/mandar/ . Now i want to write a script to run all the python scripts from this directory and monitor them every minute...if any process is dead or hung it should be restarted by this script.
I know that i can use crontab to run shell script every minute but i need help in that shell script which will do the above job for me .
THANK YOUSmilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to run 2 python scripts at the same time side by side on the same line?

Could I run 2 python scripts at the same time side by side output on the same line in this same format but with scripts? from itertools import izip_longest with open("file1") as textfile1, open("file2") as textfile2: for x, y in izip_longest(textfile1, textfile2, fillvalue=""): x =... (4 Replies)
Discussion started by: bigvito19
4 Replies

2. Shell Programming and Scripting

Capture run time of python script executed inside shell script

I have bash shell script which is internally calling python script.I would like to know how long python is taking to execute.I am not allowed to do changes in python script.Please note i need to know execution time of python script which is getting executed inside shell .I need to store execution... (2 Replies)
Discussion started by: Adfire
2 Replies

3. Shell Programming and Scripting

Run 2 shell scripts simultaneously from one script

i Run 2 scripts on all of around 50 nodes every day. 1.Mod_1.sh 2.Mod_2.sh eg.. i run file with specific node no like Mod_1.sh NODE_(node number) Mod_2.sh NODE_(node number) I want to run both file by using single script with unique node number. Eg.. Mod_new.sh NODE_(node... (11 Replies)
Discussion started by: Ganesh Mankar
11 Replies

4. Shell Programming and Scripting

How to run scripts parallely inside shell script?

Hi , I have 4 scripts example script1,script2,script3,script4 . I have to run script1,script2 and script3 parallely since this 3 scripts dont have dependencies . Once script1,script2 and script3 got completed successfully , I have to trigger script4. Can someone help me on this how to... (10 Replies)
Discussion started by: vinothsekark
10 Replies

5. Shell Programming and Scripting

How to run the Shell Script from external directory using java?

Hi, I have created a Shell Script and invoke through java using Process Builder It's working fine, if (Shell script file ) in the same directory as java file. By Problem: How to run the Shell Script file( resides in external directory) using java. What configuration i have... (1 Reply)
Discussion started by: nanthagopal
1 Replies

6. Shell Programming and Scripting

Shell script to run a python program on multiple entries in a file

Hello I am trying to run a python program using shell script, which takes a single argument from a file. This file has one entry per line : 1aaa 2bbb 3ccc 4ddd 5eee ... ... ... My shell script runs the program, only for the last entry : #!/bin/sh IFS=$'\n' for line in $(cat... (2 Replies)
Discussion started by: ad23
2 Replies

7. Shell Programming and Scripting

script that reads all the scripts in the directory and run them within that script

Hi I am trying to write a shell script that is reading all the scripts in the current directory (currently 5) and is allowing me to run the scripts that is in the directory. I want that this scripts asks te user to execute 1 of the listed scripts. I have 4 sample scripts in the directory:... (8 Replies)
Discussion started by: I-1
8 Replies

8. Shell Programming and Scripting

sequentially run the shell scripts.

Hi All, I have a master script , which would run 4 scripts in sequence. When the first script gets executed , I need to check if a particular process has been completed. If it is completed , only then proceed with the second script. This same rule applies to script3 and script4. Can someone... (4 Replies)
Discussion started by: nua7
4 Replies

9. Shell Programming and Scripting

Run scripts within a script..

Hi all... I have several scripts of varying types (shell script, expect script, awk script) that I would like to run within 1 script.. They also take a command line argument (which it is getting successfully). The problem is, the parent script is exiting after the first script it calls is... (2 Replies)
Discussion started by: earnstaf
2 Replies

10. Linux

Possible ways to run shell scripts on Windows

Hi all, I want to know possible ways to exceute the shell scripts on Windows environment. Please help me. Regards, Uday. (2 Replies)
Discussion started by: uday123
2 Replies
Login or Register to Ask a Question
IRUNNER(1)																IRUNNER(1)

NAME
irunner - interactive runner interface SYNOPSIS
irunner [options] file_to_run DESCRIPTION
irunner is an interface to the various interactive runners available in IPython's irunner module. It can used to run scripts as if they where typed up interactively. The already implemented runners are listed below; adding one for a new program is a trivial task, see the source for examples. OPTIONS
-h, --help show this help message and exit --ipython IPython interactive runner (default). --python Python interactive runner. --sage SAGE interactive runner. EXAMPLE
irunner.py --python -- --help will pass --help to the python runner. Similarly, irunner.py --ipython -- --interact script.ipy SEE ALSO
ipython(1) AUTHOR
irunner is an extension of Ken Schutte <kschutte-AT-csail.mit.edu>'s script contributed on the ipython-user list: http://mail.scipy.org/pipermail/ipython-user/2006-May/003539.html This manual page was written by Bernd Zeimetz <bernd@bzed.de>, for the Debian project (but may be used by others). Modified by Fernando Perez <Fernando.Perez@berkeley.edu> for inclusion in IPython. July 15, 2011 IRUNNER(1)