Skip to content

Instantly share code, notes, and snippets.

@jacksonpradolima
Forked from aldantas/add_job.sh
Created November 8, 2017 19:59
Show Gist options
  • Save jacksonpradolima/7e42a0e35259c648b9406aab01b4c59c to your computer and use it in GitHub Desktop.
Save jacksonpradolima/7e42a0e35259c648b9406aab01b4c59c to your computer and use it in GitHub Desktop.
#/bin/bash
#########################################
## Parametros que le pasamos al script ##
#########################################
#$ -S /bin/bash
#######################################
# Usar el directorio de trabajo actual
#######################################
#$ -cwd
# Tiempo de trabajo
#$ -l h_rt=2400:00:00
# juntar la salida estandar y de error en un solo fichero
#$ -j y
###########################
# usar colas indicadas
###########################
##$ -q libra.q
##$ -q loki.q,pegasus.q
#$ -q loki.q
##$ -t 1-30:1
##$ -o /dev/null
echo ""
echo "Host --> $HOSTNAME"
echo Init Time: `date`
init=`date +'%s'`
echo $1
eval "$1"
final=`date +'%s'`
echo ""
echo End Time: `date` --- run in $(( (($final-$init)/3600) )):$(( (($final-$init)/60)%60 )):$(( (($final-$init))%60 )) ---
# mkdir -p "$SGE_O_WORKDIR/logs/"
# mv "$SGE_O_WORKDIR/addjob.sh.o$JOB_ID" "$SGE_O_WORKDIR/logs/"
echo "Pronto!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment