Page 1 of 1

Sharepoint automated restore task shedule not working

Posted: 29 Feb 2012 06:19
by kalyan21
Hi Experts,

I have created a batch file and added in tasksheduler with high prority but I dont know why its not running successfully, In schedule taskmgr its show its running but notting happens

but when I run the batch file manully its working fine, please suggest

OS: windows 2008 rc2 server 64 bit

----------------------------------------------------------------------------------------------

@echo off
for /f "delims=" %%x in ('dir /od /a-d /b \\192.168.10.15\SPbackup\backup') do set recent=%%x
echo %recent%

stsadm -o restore -url http://spbackup.mydomain.com:80 -filename "\\192.168.10.15\SPbackup\backup\%recent%" -overwrite


@echo off

echo > "g:\SPbackup\endsat%current%.tmp"

@echo restore completed

pause

--------------------------------------------------------------------------------------------------------------------------------

Re: Sharepoint automated restore task shedule not working

Posted: 29 Feb 2012 06:39
by foxidrive
The scheduled tasks will have to run under your account with network and probably admin privileges.

Is that the case?

Re: Sharepoint automated restore task shedule not working

Posted: 29 Feb 2012 07:30
by kalyan21
yes I am running it with admin rights but still :-(

Re: Sharepoint automated restore task shedule not working

Posted: 29 Feb 2012 10:41
by Squashman
When you scheduled the task did you enter in a username and password for the task to run under? Does this use have the appropriate permissions and privileges to run the scheduled task?

Re: Sharepoint automated restore task shedule not working

Posted: 02 Mar 2012 03:15
by kalyan21
The server where I am running is a client of Domain and I am domain ADmin

I have tried both ways

Re: Sharepoint automated restore task shedule not working

Posted: 02 Mar 2012 03:37
by foxidrive
Put this at the start and set it to interact with the desktop

@echo off
echo running...
pause


and then launch the task manually in scheduled tasks to see if it runs - then schedule it for 10 minutes and watch it.

Also put PAUSE as the last line so you can see any error messages on the console.

Re: Sharepoint automated restore task shedule not working

Posted: 03 Mar 2012 03:37
by kalyan21
Tried, in taskschedular it showing running but notthing pop ups
I even tried to see in taskmanger services there I can see the process in running state but notthing shows up

Re: Sharepoint automated restore task shedule not working

Posted: 03 Mar 2012 05:15
by foxidrive
Is the scheduled task set to interact with the desktop? I think that is a setting in Vista and Win7.

If the batch file console popped up and you can see the pause at the start and the end, does the console show any messages?