Add email alert to all Jobs/Tasks without opening each one - VisualCron - Forum

Community forum

mcotey
2019-03-28T14:46:26Z
Good morning. I tried searching the forums but didn't see this particular topic although admittedly my search-fu may have failed me.
Anyway what I am after is a way to get my default email rule added to all jobs and tasks to notify me on job/task fail. I don't want to have to open each and every task to add the email alert to the flow.

Thank you!
Gary_W
2019-03-28T15:19:54Z
It seems you are basically looking for a server-level error flow? If so, go to the server tab/settings/default flows/ and add an "on error" for job and task that will run a notification.

Not sure if this will change existing jobs though. Do some experimenting to make sure job and task error flows override this in case you need that.
I believe this setting sets the default for future job/task creation but I have not tested this.
mcotey
2019-03-28T15:33:43Z
Yep you got it. And yes I was hoping to find a way to apply it to all existing jobs. We have a HUGE list of jobs and each of those jobs has anywhere from 6 to 24 tasks. At first I am just looking to get an alert when something fails. Down the road I would like that alert to include if it was a task within a job or something in the job itself and then some detailed info such as name of the task and the exit code or something. For now I would just settle for an email that lets me know something went sideways and to check the server.

mcotey
2019-03-28T15:42:07Z
Figured it out. Under the Default Flows after creating the job you can right click and Apply to All Existing Jobs.

Now to figure out how to get some details added to the alerts.
thomas
2019-03-29T09:19:47Z
Use these variables as a starting point:

{JOB(Active|Name)}
{TASK(PrevTask|Name)
{TASK(PrevTask|ExitCode)}
{TASK(PrevTask,StdErr)}

In out email notification we send info like this (html):

Capture.PNG

Scroll to Top