You must make sure that you are in the same directory as MyScript.sh or sbatch will not find MyScript.sh

Best practice is to use complete paths in your scripts: e.g. /home/username/path/MyScript.sh

Output of this job goes to myOut.txt (-o myOut.txt)

Errors produced from this job go to myError.txt (-e myError.txt)

This will run MyScript.sh in the medium queue (-p medium), asking for 16G of memory.

You can also put these parameters into a single file, along with the execution of it, to make things easier and more consistent:
#!/bin/bash
#SBATCH -o myOut.txt
#SBATCH -e myError.txt
#SBATCH --mem=16G
#SBATCH -p medium
cd /home/username/path
./MyScript.sh
echo ""
echo "Done! This message will appear in the output file: myOut.txt"

Name this single file as MyJob.sh

To Run it:

cassini> sbatch MyJob.sh

This will do exactly the same work as the above job with all parameters placed on the command line.

Viewing your job and job parameters

To see the status of this job (and all jobs running):

cassini> qstat

You can also isolate just your jobs (or any username) using the -u flag:

cassini> qstat -u username

To view information about the queues themselves:

cassini> sinfo

You can also specify the number of processors you want with the -n flag:
#!/bin/bash
#SBATCH -o output.txt
#SBATCH -e errors.txt
#SBATCH -J /home/username/path/MyScript.sh
#SBATCH -n 4