Hi Aaron,

Thanks for your reply. Its very helpful to me.

Can you please explain steps to create freestyle job triggered by cron in 
Jenkins. Whenever checks into the Gitserver, if Gitserver was down 
automatically email notification need to come. 


Regards,
Sarfroz Basha


On Wednesday, April 10, 2019 at 5:06:03 PM UTC+5:30, Aaron Digulla wrote:

> Hi Sarfroz,
>
> To make sure I understand you correctly:
>
> - Your Git server was down
> - Jenkins did start a job
> - The job tried to check out the code from Git
> - That step failed
> - You didn't receive a mail for this specific failure (usually, it works)
> - You're using Scripted Pipeline, not Declarative Pipeline
>
> Correct?
>
> The problem here is that the mail recipients come from the Jenkinsfile. 
> When Git isn't running, Jenkins can't get the Jenkinsfile and therefore has 
> no chance to figure out where to send mails.
>
> Try to set up monitoring of the Git server outside of Jenkins.
>
> Alternatively, use a freestyle Job triggered by cron which periodically 
> checks that it can connect to the Git server (just execute a git ls or 
> something again a small repo). You can then send a mail from this job when 
> it fails.
>
> Regards,
>
> Aaron Digulla
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/a67da821-a13b-4bb5-873c-340126bc28c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to