1) Create a job-script myJobScript.sh
Job-script contains the HPC queue settings (queue name, log-files, email, ...) and the main tool command (e.g. echo, BLAST, bowtie2, ... )
Example job-script (text file) myJobScript.sh
#!/bin/bash
#$ -q std.q # queue name to which script will be submitted
#$ -N DemoScript # script name to be visible in the queue
#$ -o /my/new/project/log_output_$JOB_ID.txt # command output file in project path
#$ -e /my/new/project/log_error_$JOB_ID.txt # command error message file
#$ -M my.email.address@gmail.com # to get notifications about script status
#$ -m ea # send email in case of job end or abort(error)
#$ -pe smp 8 # number of required processors
# go to working directory
cd /my/new/project/
# run main tool command
echo "Hello from `hostname`!"
2) Submit the job-script
# submit a job-script ( add “myJobScript.sh” as new job to queue “std.q” )
qsub myJobScript.sh
# check status of all submitted jobs ( Is my job still waiting in queue or already running? )
qstat -f
# delete job ( remove an already submitted job-script by using the job-ID "12345" shown by "qstat -f" )
qdel -j 12345