0

We have a series of tasks which, when run interactively over the command line run fine creating temporary files and (importantly) logs and backups.

When we schedule the task with Administrator privileges to run at the highest priority, however, no logs or temporary files are created! All the directories have read/write privileges as administrator.

Has anyone else experienced this??

We are running Windows 2008 Server & the job is configured for 'Windows Vista or Windows Server 2008'.

Any help would be much appreciated!


OK - so we installed Z-Cron and it works perfectly.... Still a really really strange error from Windows 2008 Task Scheduler, but a solution is perhaps not quite so urgent now we have Z-Cron working!

Nick Cartwright
  • 101
  • 1
  • 4

2 Answers2

1

Check C:\Windows\Temp. For me, when the scheduled task runs when not logged in, it was using this location as TEMP instead of C:\Users\USER\AppData\Local\Temp.

For me, this problem only struck while using Windows Server (2012) - didn't occur when using a client version of Windows (e.g., Windows 7).

Note, that when logged in and running the task manually - it would use the users temp location - which was what was throwing me.

Glen Richards
  • 41
  • 1
  • 7
0

Make sure that your Start Location for the script is the correct place. It's possible the script is trying to do this in the wrong location? If this doesn't work can you tell us what the result in Task Scheduler is? It should at least be telling you if it's failing for some reason - or if the Task Scheduler thinks everything is succeeding. If you can run it manually from the command line then your script is working - which leaves: Permissions and Location.

Dave Holland
  • 1,898
  • 1
  • 13
  • 18
  • Hi there. Thanks for your reply! Task Scheduler thinks everything is succeeding. We have reduced our script down to a python script with the following code: 'import os os.mkdir('folder_1234')', so we are sure nothing else is happening in there. Regarding permissions, we are running the script as Administrator, but we will try running from a different drive. – Nick Cartwright Sep 16 '10 at 08:34