@echo off
set day=%date:~7,2%
set month=%date:~4,2%
set year=%date:~10,4%
set today=%year%%month%%day%
mysqldump -u root -ppassword --host 192.168.1.1 DBNAME > C:\Users\Administrator\Documents\database\backup%today%.sql
echo Done!
exit
I have the above code in a bat file to back up my database. When I run this in cmd it backups the database no problem. When I ad it to the task scheduler that is where I get my problem. When I run it manually it says running for a long time and I dont know what is problem or if it is even running properly.
Also in the destination folder I see a file but it has size of 0 but if i run this in cmd i get the correct size.
What is the cause of this in task scheduler