#!/bin/bash -l # Submit job with the command: qsub stata-mp.qsub # To view the status of the job: qstat -u username # Set the runtime limit (default 12 hours): #$ -l h_rt=12:00:00 # Send email when the job is done (default: no email is sent) #$ -m n # Give the job a name (default: script name) #$ -N myjob # Combine output and error streams #$ -j y # Submit 4 tasks #$ -t 1-4 # Make sure a directory with name logs exists #$ -o logs rm -rf mystata_log*.log module load stata/17 stata -b do tasks.do