[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [HTCondor-users] Notification :- setting "notify_user" as variable not working



Hello Gagan,

You may also need to add notification condition.Â

notification = <Always | Complete | Error | Never>

From doc:

Owners of HTCondor jobs are notified by e-mail when certain events occur. If defined byÂAlways, the owner will be notified whenever the job produces a checkpoint, as well as when the job completes. If defined byÂComplete, the owner will be notified when the job terminates. If defined byÂError, the owner will only be notified if the job terminates abnormally, (as defined byÂJobSuccessExitCode, if defined) or if the job is placed on hold because of a failure, and not by user request. If defined byÂNeverÂ(the default), the owner will not receive e-mail, regardless to what happens to the job. The HTCondor Userâs manual documents statistics included in the e-mail.

Thanks & Regards,
Vikrant Aggarwal


On Fri, Jan 6, 2023 at 4:10 PM gagan tiwari <gagan.tiwari@xxxxxxxxxxxxxxxxxx> wrote:
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/