Jump to content

Recommended Posts

Posted

Morning all,

 

I've just set-up a scheduled task to run a backup of our SIMS DB and DMS and need to set-up an email alert to inform me whether the backup has been successful or not.

 

Some sites have suggested using the task scheduler 'send email' functionality by setting up a task based on an event, however I've read that this does not always work as it cannot always detect the SMTP login?

 

Has anyone else set something similar up, or have any ideas how to go about setting up this script?

Not sure if I should go ahead an write a script based on the event or involve the email script into the scheduled task itself?

 

:confused:

Posted

Not done it, but perhaps 'on success' the backup script could create a "backup_successful" file, meanwhile you have a powershell script running (launched at startup and monitored/restarted by scheduled tasks) that is watching the folder for the creation of the file and takes the action required (in this case - email backup success notification).

 

Use PowerShell to Monitor for the Creation of New Files - Hey, Scripting Guy! Blog - Site Home - TechNet Blogs

Sending email using Powershell script - SharePoint and Others - Site Home - MSDN Blogs

 

The backup script should, as one its first tasks, remove the backup_successful file.

Posted
We have our backup for SIMS launched by powershell, and it checks the logs on completion and then e-mails us. We not using anything fancy for backup, just the standard Windows Backup and robocopy
Posted

I have an SQL Management plan that does the backup. This then has a success failure option at the end. I get an email either way using the built-in email functionality.

It's really useful.

I'm looking to extend this to run a query on how much free space is left on the drive, so i can get a heads up if disk space starts to run low.

This would help with the DB backup, but not the DMS.

 

I'm sure you can use powershell to inspect the event logs and look for a failure on the task. I used to use an eventlog exporter to dump the data to a file / new DB then run queries on it. This was way before powershell days, so nowadays it will be easier to just query and email like @Boredguy mentions.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...