Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Task Schedule not working in windows 2012

Posted on 2015-01-06
4
Medium Priority
?
283 Views
Last Modified: 2015-01-06
Hi,

I have some application installed in windows 2012 server and I am taking backup using below command.
pg_dump -h localhost -p 5432 -U adempiere adempiere 1>D:\Adempiere\Data\ExpDat.dmp

I created a .bat file and copied these commands. If I run the .bat file manually, it works fine and backup happens.

If I schedule a task to run the .bat file, the task shows completed, but there is no backup happens. I tested this in windows 2008 server, there also the same issue.

But in windows 2003 server, task scheduler works fine. What might be the issue
0
Comment
Question by:kolathaya123
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 4

Expert Comment

by:Manoj Bojewar
ID: 40533300
Hi,
run the schedule task using system account and let us know the status.

Thanks,
Manoj
0
 
LVL 7

Accepted Solution

by:
Deadman earned 2000 total points
ID: 40533338
In Program\script mention only the name of batch file or script and box to contain just the name of the script and place the folder path in the Start in (optional) box

schedtask2.jpg
0
 
LVL 71

Expert Comment

by:Qlemo
ID: 40534488
You should add error logging to your script, like with
pg_dump -h localhost -p 5432 -U adempiere adempiere 1>D:\Adempiere\Data\ExpDat.dmp 2>D:\Adempiere\Data\Errors.log

Open in new window

0
 

Author Closing Comment

by:kolathaya123
ID: 40534992
Excellent.. Thanks alot
0

Featured Post

Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Resolve DNS query failed errors for Exchange
OfficeMate Freezes on login or does not load after login credentials are input.
This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…
This tutorial will walk an individual through the process of installing of Data Protection Manager on a server running Windows Server 2012 R2, including the prerequisites. Microsoft .Net 3.5 is required. To install this feature, go to Server Manager…

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question