Email notification on schedule via command line

  • 3 November 2021
  • 13 replies

Badge +7



I’m trying to add an alert to my script, when a scheduler runs to send the output via email to the client.

I want to configure this via command line.

I searched in the documentation but didn’t seem to find any information about this.

Does anyone know how to do this configuration?


Kind regards,



Best answer by Mike Struening RETIRED 11 February 2022, 17:14

View original

13 replies

Userlevel 7
Badge +15

Hi @jmiamaral 

Please can you clarify what you need to achieve and provide some extra details?

You can add an alert to trigger for various criteria, e.g. when a job fails, when any job with any status completes, when certain thresholds are met:

Creating an Alert

Creating an Alert from the Alert Wizard

You can certainly provide alert output via email, but there are certain ways and conditions to trigger an alert, so we need to understand more about the script and scheduler actions you need to alert on.



Badge +7

@Stuart Painter 

I’m provided with an email, and i have to associate an alert for a respective scheduler with that email and send the output of job failed/sucessfull to that email.

I have a script to create schedules but i cant seem to find a way to add that notification to the schedule via command line.


Kind regards,


Userlevel 7
Badge +23

@jmiamaral , have you looked into the execute script option?

The important part:

You can use this command to run the XML files generated from the Save As Script option in the CommCell Console as well as user-created XML files.

This way, you can export creating an alert or schedule to xml and use those as the scripts.

Badge +7

I saved as a script directly from Commvault with the alert configured, but when i see the generated xml i dont see the element for the email notification.

This is my example of xml created with the alert:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>


        <alertName>Data Protection - Wednesday, 03, November, 2021 16:31:7</alertName>
        <appGroupName>Archived Files</appGroupName>
        <appGroupName>Protected Files</appGroupName>
        <active_start_date>2021-11-03 00:00:00</active_start_date>
          <TimeZoneName>(UTC+00:00) Dublin, Edinburgh, Lisbon, London</TimeZoneName>
        <description>Every week on Friday at 21:00  starting November 3, 2021 </description>


Kind regards,


Userlevel 7
Badge +23

It looks like it didn’t add the alert context, though the alert is listed by name.

Let me check with some internal folks to see if we need to get the alert creation XML and splice it inside the schedule creation XML, or something different.

Badge +7

Hello, you have any updates regarding this issue?


Kind regards,


Userlevel 7
Badge +23

@jmiamaral , let me follow up with a few more people.  I’ll get you something!

Userlevel 7
Badge +23

@jmiamaral , I’m not getting too far with this one.  I would suggest opening a case with support to have them dive in.

Once you do, share the support case number with me to track.


Badge +7

@Mike Struening Ok will do, thank you for your time.

Userlevel 7
Badge +23

Of course, sorry I couldn’t help more.

Let me know the case number was created so I can track it!

Badge +7

@Mike Struening CV ID: 211209-344

Userlevel 7
Badge +23

Looks like there might be a need for a CMR.  I’ll keep following!

Userlevel 7
Badge +23

Sharing the archived solution:

--One-Time Schedule was shared with the customer which will help create a one-time task with an alert associated with it.

-- We modified the previous approach so that this is possible through the command line.