Link to home
Start Free TrialLog in
Avatar of Nilesh Havire
Nilesh HavireFlag for India

asked on

How to scheduled Mysql Backup & send email notification

Hi Friends,

I am using Windows 2008 Server & Mysql SQL Database, Now I am taking my sql backup by running batch file on scheduled, batch file code is as per below, can anyone help me for email notification configuration, whenever batch file will execute on scheduled & Task will be success  that time I should get notification on my mail id, I have configured SMTP on same server

Thanks in Advance


@echo off
for /f "tokens=1" %%i in ('date /t') do set DATE_DOW=%%i
for /f "tokens=2" %%i in ('date /t') do set DATE_DAY=%%i
for /f %%i in ('echo %date_day:/=-%') do set DATE_DAY=%%i
for /f %%i in ('time /t') do set DATE_TIME=%%i
for /f %%i in ('echo %date_time::=-%') do set DATE_TIME=%%i
mysqldump -u helpdesk -p"Platys45" db_java > E:\Development\my_sql_hourly_backup\%DATE_DAY%_%DATE_TIME%_database.sql
ASKER CERTIFIED SOLUTION
Avatar of Radhakrishnan
Radhakrishnan
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Nilesh Havire

ASKER

I dont want to use 3rd party tool, & above link is for Linux, My script is working fine, I just want to get email notification whenever task will success


Regards
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial