An example script is in /cm/shared/apps/slurm/current/examples directory.   Experiment with “sleeper.sh” to get started.