Differences between revisions 3 and 6 (spanning 3 versions)
Revision 3 as of 2009-11-19 15:59:53
Size: 706
Comment:
Revision 6 as of 2009-11-19 16:27:12
Size: 820
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:

== ParallelProgramming ==

 * http://www.scipy.org/ParallelProgramming
Line 5: Line 9:
crontab
Line 7: Line 11:
# crontab file. Use cron crontab to load the file  # Use cron to feed the demon
Line 18: Line 22:
0 * * * * /path/to/test.py > /path/to/test.log 2>&1 0 * * * * /path/to/start_test.sh > /path/to/test.log 2>&1
Line 22: Line 26:
start_test.sh
Line 24: Line 29:
#start_test.sh
Line 27: Line 33:
./test.py /path/to/test.py
Line 30: Line 36:
test.py

Python

ParallelProgramming

Starting a Python 2.6.2 script automatically

crontab

# Use cron to feed the demon
#  ENTRIES:
#
#     Minute  0-59
#     Hour    0-23
#     Day of month    1-31
#     Month   1-12
#     Day of week     0-6, with 0 = Sunday


# Start script every hour and write output in logfile
0      *      *       *       *      /path/to/start_test.sh  > /path/to/test.log 2>&1

start_test.sh

#!/bin/bash
#start_test.sh
source /client/etc/profile.zmaw
module load R/2.7.0
module load Python/2.6.2
/path/to/test.py

test.py

   1 #!/usr/bin/env python
   2 #test.py
   3 import sys
   4 print sys.version

Don't forget to make these files executable with chmod +x filename.

IfmWiki: SeaiceGroup/snow1/Python (last edited 2009-11-19 16:27:12 by LarsKaleschke)