Sharepoint automated restore task shedule not working

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
kalyan21
Posts: 4
Joined: 29 Feb 2012 06:16

Sharepoint automated restore task shedule not working

#1 Post by kalyan21 » 29 Feb 2012 06:19

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

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

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Sharepoint automated restore task shedule not working

#2 Post by foxidrive » 29 Feb 2012 06:39

The scheduled tasks will have to run under your account with network and probably admin privileges.

Is that the case?

kalyan21
Posts: 4
Joined: 29 Feb 2012 06:16

Re: Sharepoint automated restore task shedule not working

#3 Post by kalyan21 » 29 Feb 2012 07:30

yes I am running it with admin rights but still :-(

Squashman
Expert
Posts: 4465
Joined: 23 Dec 2011 13:59

Re: Sharepoint automated restore task shedule not working

#4 Post by Squashman » 29 Feb 2012 10:41

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?

kalyan21
Posts: 4
Joined: 29 Feb 2012 06:16

Re: Sharepoint automated restore task shedule not working

#5 Post by kalyan21 » 02 Mar 2012 03:15

The server where I am running is a client of Domain and I am domain ADmin

I have tried both ways

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Sharepoint automated restore task shedule not working

#6 Post by foxidrive » 02 Mar 2012 03:37

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.

kalyan21
Posts: 4
Joined: 29 Feb 2012 06:16

Re: Sharepoint automated restore task shedule not working

#7 Post by kalyan21 » 03 Mar 2012 03:37

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

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Sharepoint automated restore task shedule not working

#8 Post by foxidrive » 03 Mar 2012 05:15

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?

Post Reply