Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scheduled task runs but doesn't work

Status
Not open for further replies.

scottew

IS-IT--Management
Mar 6, 2003
492
US
I have the following script set up to run as a scheduled task. It says that it runs, but it doesn't do anything. If I just run the script, it runs fine and works properly.

Code:
SET ACTSourceFolder="D:\TestData" 
SET ACTDestinationFolder="\\server\itsupport\ACT_Testbackup" 
SET XcopyOptions=/E /C /H /O /Y /I

xcopy %ACTSourceFolder% %ACTDestinationFolder% %XcopyOptions%

I have checked all the permissions and everything is set correctly. The account that it is scheduled to run with is a Domain Admin account.

Any ideas as to why this won't work as a scheduled task?

Thanks,
Scott



 
Have you been logged onto the console when the script runs? If so, do you see the command window open?

If not, would you expect to? Should you? (I don't use vb scripts for this stuff...I use old school BAT files which do display the command window as the "script" executes.)

If you can/should/do see the command window as the script executes place a pause before and after the xcopy so you can see any feedback.

-- Jason
"It's Just Ones and Zeros
 
Thanks jdemmi, This is a BAT file and I just did another test with the pause in there. I also changed it to run with my username/password and it worked fine.

I originally had it set to run with a specific username/password and it still will not work. This user account has all the same rights as my account.

Now I need to figure out why it won't work with this account.

Scott

 
Can you try logging into the server as the user you want to run the task as and setting the scheduled task up as that user?

Does that make sense?

-- Jason
"It's Just Ones and Zeros
 
create a basic account. No need to use a DA account. Make sure the permissions are set properly. Then on the server running the batch set this dedicated account to log on as a batch job.
Run gpedit.msc, then follow this path:
Local Computer Policy / Computer Configuration / Windows Settings /
Security Settings / Local Policy / User Rights / Logon as a batch job.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top