Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Task Scheduler Windows 2008 R2

Posted on 2013-05-10
3
Medium Priority
?
1,086 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
[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
  • 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 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Scenario:  You do full backups to a internal hard drive in either product (SBS or Server 2008).  All goes well for a very long time.  One day, backups begin to fail with a message that the disk is full.  Your disk contains many, many more backups th…
Background Information Recently I have fixed file server permission issues for one of my client. The client has 1800 users and one Windows Server 2008 R2 domain joined file server with 12 TB of data, 250+ shared folders and the folder structure i…
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
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…
Suggested Courses

722 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