We had hacked in the ability for users to get an email when their job starts when we first installed OnDemand 1.1. We just upgraded to 1.3 and see that there is now both email address and the ability to get an email when the job terminates. We did not port any of our changes to version 1.3 and wanted to use those options that are built in instead. I must be missing something though as these don’t seem to be working. I’ve added bc_email and bc_email_on_terminate to my form but the info doesn’t make it to my job script (we’re running SLURM). They are, however, found in the user_defined_context.json file. Also, instead of the Boolean it is configured as, when I add bc_email_on_terminate to the form it shows up as a text box.
Notice, missing are bc_email and bc_email_on_terminate. Based on your description I think you want a text field for the user to enter the email address, and a checkbox to check if they want to receive an email when the job stops.
Solution 1:
You can do this by modifying your form.yml.erb and submit.yml.erb like this (merging the below with the rest of the form, attributes and script sections in whatever interactive app you have):
form.yml.erb
form:
- email
- email_on_terminated
attributes:
email:
label: "Email address"
help: "Email address if you want to receive emails different from the default"
email_on_terminated
widget: check_box
label: "Receive email when job terminates"
help: "If checked you will receive an email when the job terminates"