Task scheduler doesn't work unless I run it manually

3

I have a scheduled task on my Windows 2008 R2 server which is supposed to run a powershell script to download a backup of a file from another server. On this same server, I have scheduled the exact same task to run and download from 2 other servers - these tasks work fine.

This one task in particular never seems to do anything. The task history says it was executed successfully but the files are never downloaded. If I run the powershell script manually, the files are downloaded. If I run the automatic task manually, the files are downloaded again. If I disconnect and come to check the next day, the files have not been downloaded.

I have it set to run whether the user is logged on or not. Why is it not working?? How I can enable more detailed logging?

blizz

Posted 2013-07-19T14:15:52.843

Reputation: 403

if you wrote the application you can write in the code for it to log on every event. you should also check the Task/Application to make sure you know where it is downloading the file too. maybe change the path name so that it is something like c:/folder1/folder2 etc. rather than a relative pathname like ../folder4 – Malachi – 2013-07-19T18:36:15.687

Is the task scheduler service running? – MDMoore313 – 2013-07-22T13:33:06.413

Sounds like it might be an authentication issue (but unfortunately i don't know how to investigate it any further)... – C.B. – 2013-08-19T13:57:54.300

Answers

4

I had a similar case, and it seems that task scheduler treats the "start in" option differently whether you run it manually or on system startup.

My "start in" was not defined. It wasn't until I properly set it up to start my script in the desired location that I was able to reproduce the same behaviour regardless of whether I was running on startup or running manually.

muzzamo

Posted 2013-07-19T14:15:52.843

Reputation: 188

0

Check the condition tab in the properties of task. In my case, start the task only if the computer is on AC power was CHECKED. I disabled that and now its running.

oya163

Posted 2013-07-19T14:15:52.843

Reputation: 101

0

I have faced the same issue, my task would take more then 3 hours to complete, and in logs it would stopped exactly after 2 hours.

Right click on task in Task Scheduler -> export. It will export the task in xml format. Open the xml file in Notepad and check the <ExecutionTimeLimit> of your task.

Edit the file and import the task according to the time limit required for your task.

Fahim Ghauri

Posted 2013-07-19T14:15:52.843

Reputation: 1

It does not seem to be the same problem as in the question. You can post a new question and (after a time limit) answer it yourself. – pabouk – 2013-11-12T11:14:35.987