I have submitted several jobs on a computing cluster, but did not set the --mail-user. Can I update the specification now? Hope to receive emails after the jobs finish running. Thanks a lot!
3 Answers
I am not sure Slurm allows that. What you can do is submit a dummy job dependent on the already-submitted job (with jobid <your-job-id>
), like this:
sbatch --mail-user=<your-email-address> --mail-type=START --dependency=afterany:<your-job-id> --wrap "echo OK"
so that this job will start only when the one you wanted to modify ends, and it will send an email then.

- 52,978
- 9
- 96
- 110
-
3For me, I needed `--mail-type=BEGIN`. – chrisb2244 Feb 06 '19 at 02:00
This is not a solution
In PBS and derivatives you could update job attributes with qalter
command.
In SLURM some of the functions of qalter
can be performed with scontrol update
, however it does not seem to update the mail-user
attribute.
The scontrol update
command would look like
scontrol update jobid=<your-job-id> mail-user=<your-email-address>
However this command does not work as mentioned by Damien Francois in the comments. SLURM reports the following error:
Update of this parameter is not supported:
mail-user=<your-email-address> Request aborted

- 16,199
- 6
- 40
- 76
-
2The suggested command fails with (Slurm version 15.08.11) ``Update of this parameter is not supported: mail-user=
Request aborted``, and indeed the man page of scontrol does not mention any possibility of changing the email setting of the job. – damienfrancois Jul 05 '16 at 10:00
MailUser
and MailType
fields can be updated. The default MailUser
is the submitting user, so it may only be necessary to update the MailType
.
scontrol update jobid=<jobid> MailUser=<user@domain.com>
scontrol update jobid=<jobid> MailType=<END,FAIL,...>

- 4,159
- 1
- 21
- 31