Solved

Task Scheduler Windows 2008 R2

Posted on 2013-05-10
3
1,073 Views
Last Modified: 2013-05-20
My task scheduler is not doing what the history file for the task says it is doing.  All I'm doing is copying a MySQL DB from a production server to a backup server.  I'm launching a bat script which then launches a PS script.  The PS script looks for the newest file in the production backup directory and copies it to the backup directory on the backup server.

The PS script works by itself.  The bat script successfully launches the PS script.  I can manually launch the task from CLI and from within the Task Scheduler and the backup occurs.  The trigger is to run daily at 9 PM, and it is enabled.  The task is set to run whether I'm logged on or not, and I've set it to run on a domain admin account.

The history tab in task properties shows that that job is successfully run every day, yet unless I manually launch the job, the copy doesn't occur.

The task runs from the production server, which is a fairly busy server as it hosts our CRM application.

The only strange thing that I notice is that when I open TS and click on the TS library, the info pane  shows that the trigger is set for 9PM every day, yet "Next Run Time" is for 10PM today, and that "Last Run Time" was 10PM last night (which didn't occur).

The "Last Run Result" for the task is "The operation completed successfully. (0x0)"

The servers are in 2 different Sites and are connected by a fast WAN link, but it's obviously not a connectivity issue or I should be seeing errors in the History tab.
0
Comment
Question by:sgt_zim
  • 2
3 Comments
 
LVL 15

Expert Comment

by:ZabagaR
ID: 39156863
Can you put a line of code in the .bat script and the PS script that echo a line of text to a temp file? At least you can check the temp file afterward to see how far the script(s) got.
Make sure the other tabs on 'task scheduler" aren't stopping it. For instance, uncheck the "don't run while on battery power" box. I had servers that for some reason thought they were on battery, and never launched their task. That's under the 'conditions' tab. I'm assuming your user has the user privilege to 'logon as a batch job'...an admin should have.
Is there any reason your script may require an interactive user session? some code won't run unless a user has an active windows session. That's all I can think of right now.
0
 

Author Comment

by:sgt_zim
ID: 39182178
Zabag, I tried all of that.  Digging around a bit more, I discovered that the problem was the DST offset.  Turned the DST offset off and the scripts do their job.
0
 
LVL 15

Accepted Solution

by:
ZabagaR earned 500 total points
ID: 39182581
Oh okay. Doesn't DST automatically know when to adjust the time? I'm surprised it needed manual intervention. Well you got it working, that's all that matters.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Redirected folders in a windows domain can be quite useful for a number of reasons, one of them being that with redirected application data, you can give users more seamless experience when logging into different workstations.  For example, if a use…
A safe way to clean winsxs folder from your windows server 2008 R2 editions
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

910 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now