|
Answer» I written a simple .bat file saved on a USB flash drive j: that connected on a sbs2003.
It backup some data files from server to j:
REM this program was mytest28.bat it backs up the 4 data files on s-hkrgct server
REM . it is in flash drive, must use j: drive letter
REM NAME is backuptripssql-data.exe
net stop sqlagent$tma
net stop mssql$tma
del \dbyestoday\*.* /q
move \yestoday\*.* \dbyestoday\
move \today\*.* \yestoday\
cd \today
copy d:\tma\sql_data\
net start mssql$tma
net start sqlagent$tma
It WORKS after scheduled it through Control Panel – Scheduled Task. It doesn’t WORK after COMPILED it to .exe file (it is saved on j: drive too). But it works when I double click this .exe file.
There are some .exe files of scheduled backup and system reports on the LIST of Scheduled Tasks.
Can I put scheduled task .exe file on flash drive? Or some reason?
Peter
|