Running Julia in a SLURM Cluster

I find that doing this is easiest, and seems to work well for me:
Putting this at the top of my script.jl,

#!/usr/bin/env julia

#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=4
#SBATCH --mem-per-cpu=2G
#SBATCH --time=00:30:00

using Distributed
...

and then just running sbatch script.jl does the job