_______________________________________________Change this:
"notify_user": "$(emailid)",
to this:
"notify_user": emailid,
This formulation references the Python variable, which is not visible to the condor_submit $() expansion, and sets notify_user to the e-mail string. The $() expansion references other submit macros in the submission, so an alternative would be this:
âEMAILIDâ:emailidânotify_userâ:â$(emailid)â
Â
Youâd wind up with an identical ClassAd in the end, though, since condor_submit would just put the email string in there anyway upon expanding $(emailid).
Â
Michael V. Pelletier
Digital Technology
HPC Support Team
Raytheon Missiles and DefenseÂ
From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> On Behalf Of gagan tiwari
Sent: Friday, January 6, 2023 5:40 AM
To: HTCondor-Users Mail List <htcondor-users@xxxxxxxxxxx>
Subject: [External] [HTCondor-users] Notification :- setting "notify_user" as variable not workingÂ
Hi Guys,
        ÂI need condor to send email notifications to the job owner.
I have captured the user's email id in a variable and passedÂthat in the submit file but condor doesn't seem to be using it and sending e-mail do owner@uid-domain which is default.Â
Â
I am using following python codes to achieveÂthis :-Â
Â
def submit_jobs():
    emailid = get_email()  ( capturing user email as str )    emailid = emailid.split() ( capturing user email as list )
Â
    job = htcondor.Submit({
                "executable": "$(bin)",
                "arguments": "$(config)",
                "output": "$(outfile)",
                "error": "$(errfile)",
                "log": "jobstatus.log",
                "request_cpus": "1",
                "request_memory": "2GB",
                "request_disk": "4MB",
                "RunAsOwner": "True",
                "notification": "Always",
                "notify_user": "$(emailid)",
                "should_transfer_files": "No",
                })Â
I tried passing user email id both as str and as list but nothing worked.
Â
Please let me know what I am missing here.Â
Â
Thanks,
GaganÂ
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users
The archives can be found at:
https://lists.cs.wisc.edu/archive/htcondor-users/