Scheduled task not running
Hi, I am running Windows Server Enterprise 2008 SP2. I have a task scheduled to run at 4am. It runs fine if I invoke it via the scheduler manually. IfI wait for it to run daily on its own,the scheduler indicates it ran; but checking the application log confirms it did not.Below are the command file contents and the output from the scheduler:Thanks, Dave-----------------------------------------------------------------------------------SystemsIntegrationImport.exe -i Bolo.LandProWell -log c:\import\bolo\work\landprowellimport.txt -failOnDataError false -alertGroup ProductionGroup2 -alertImports true -dupCheck true <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> - <System> <Provider Name="Microsoft-Windows-TaskScheduler" Guid="{de7b24ea-73c8-4a09-985d-5bdadcfa9017}" /> <EventID>102</EventID> <Version>0</Version> <Level>4</Level> <Task>102</Task> <Opcode>2</Opcode> <Keywords>0x8000000000000000</Keywords> <TimeCreated SystemTime="2009-08-05T10:22:43.676Z" /> <EventRecordID>102991</EventRecordID> <Correlation ActivityID="{86B86299-19ED-444C-8B36-3DC02C4D6F18}" /> <Execution ProcessID="3484" ThreadID="4056" /> <Channel>Microsoft-Windows-TaskScheduler/Operational</Channel> <Computer>dataserver01.elloraenergy.com</Computer> <Security UserID="S-1-5-21-1606980848-1801674531-839522115-2147" /> </System> - <EventData Name="TaskSuccessEvent"> <Data Name="TaskName">\RunSIImport_BoloLandProWell</Data> <Data Name="UserContext">OFFICE\SQLService</Data> <Data Name="InstanceId">{86B86299-19ED-444C-8B36-3DC02C4D6F18}</Data> </EventData> </Event>
August 5th, 2009 11:09pm

Do we have any event error log occured while running the scheduled task.refer the below link and make sure you have followed all the stepshttp://technet.microsoft.com/en-us/library/cc725745.aspxhttp://technet.microsoft.com/en-us/library/cc725745.aspxTo create a new Scheduled Task preference item Open the Group Policy Management Console. Right-click the Group Policy object (GPO) that should contain the new preference item, and then click Edit. In the console tree under Computer Configuration or User Configuration, expand the Preferences folder, and then expand the Control Panel Settings folder. Right-click the Scheduled Tasks node, point to New, and select Scheduled Task. In the New Scheduled Task Properties dialog box, select an Action for Group Policy to perform. (For more information, see "Actions" in this topic.) On the Task tab, enter task settings for Group Policy to configure or remove. (For more information, see "Task settings" in this topic.) If creating, updating, or replacing a task: Click the Schedule tab, and configure one or more schedules for the task. (For more information, see "Schedule settings" in this topic.) Click the Settings tab, and enter any additional task settings for Group Policy to configure. (For more information, see "Other scheduled task settings" in this topic.) Click the Common tab, configure any options, and then type your comments in the Description box. (For more information, see Configure Common Options.) Click OK. The new preference item appears in the details pane.
Free Windows Admin Tool Kit Click here and download it now
August 6th, 2009 3:28pm

Hi,We don't have the Group Policy Management Console installed on the Server in question as it is not a domain controller. This should not prevent me from running a scheduled task on it regardless, correct?
August 6th, 2009 6:22pm

Hi Dave, Thanks for posting here. According to your description, the issue you are experiencing is that the scheduler can not run the application which runs fine manually. Do you find any event logs related to this issue? You can check the Task Schedule logs in Windows Server 2008 under Event Viewer\Application and Service Logs\Microsoft\Windows\TaskSchedule. If possible, please save it and use Windows Live SkyDrive (http://www.skydrive.live.com/) to upload the file and then give us the download address. To isolate the root cause of this issue, you may try the following steps to troubleshoot it. 1. Setup another task scheduler to run a application or script, then check if its work properly. 2. Check the Task Scheduler Service:a. Click "Start", go to "Run", type in "Services.msc" and press Enter.b. Double click the "Task Scheduler" service.c. Click the "Log On" tab, check the "Local System Account" option and also check the "Allow service to interact with desktop" option.d. Click the "General" tab, select "Automatic" as the Startup type and make sure the "Service Status" is Started.e. Click "OK" and restart the computer. f. After the computer restarts, remove all the original scheduled tasks in the Task Scheduler. Create new tasks. 3. Change applications running type to Windows Server 2003, Windows XP, or Windows 2000. a. Double-Click the Task, choose General page. b. Select Configure for: to Windows Server 2003, Windows XP, or Windows 2000 c. OK.Note: Each newly created task should have a password. The password is the same as your user account's password (this password cannot be blank).Please check whether the problem is resolved. Please try the above steps and let me know the results at your earliest convenience. Wilson Jia - MSFT
Free Windows Admin Tool Kit Click here and download it now
August 10th, 2009 9:39am

Thankyou for the suggestions. I have performed the following tests:1. We have a scheduled task that boots the computer each day. This task is working.I set up another scheduled test task using .cmd file with the contents: dir >> test.logThis runs when I double click it and puts a directory listing in the test.log file. When I schedule it, nothing happened.The scheduler logs indicate success and return code of 0.When I run the task we have been discussing in the above posts, I get return code 1 and nothing happens.2. I checked the scheduler service as you requested.The dialog indicates it is running normally but the options you describe in 2.c are greyed out or do not exist on our system.Since our boot scheduled task is working and the service is running, I assume we are ok here.3. We are running Server 2008 SP2 and this is the only option in the dropdown.I can email the logs to you if you provide an email address. I suggest we coordinate you logging on to our server using a remote support technique of your choice. As it is a production server I would put you in touch with our system administrator.PLease let me know what you think.Thanks, Dave
August 10th, 2009 6:45pm

Hi Dave, Thank you for the update. Base on your description , I performed a test on my side and got a same return code as your description. It's because when you double click the batch file it will use the user home path as default path. So you can get the test.log file. When schedule task runs the batch file. It takes the path "%systemroot%\system32\" as default path. Then the output of Batch file got an"Access is denied" error. That's why "nothing happens". You can add a "pause" into your batch file to monitor the process. To troubleshoot the first task you described, you may check the following settings. 1. Check if the task application runs under a path where log on user has the proper permission. If not, you may add a command line like "CD c:\users\%username%\desktop" in front of the command line to start application. 2. Make sure the account to run task scheduler is in group "log on as batch job" rights (server side). Control Panel|Admin Tools|Local Security Policy\Local Policies\User Rights Assignments"Log on as a batch job" Wilson Jia - MSFT
Free Windows Admin Tool Kit Click here and download it now
August 13th, 2009 10:23am

Wilson,That worked! I think the os could provide more info in the logs, but in hindsight I could have figured this out sooner as well.I appreciate your help and have a good day.Dave
August 18th, 2009 5:43pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics