0

I've written a program that should run every day at a fixed time. When I was first putting it together I had problems reaching a mapped network drive. The solution was to use the UNC path instead of the mapped drive letter. This ran under Task Manager in production just fine for over a month, but this week I started getting an error about the drive not being available.

When I run the script from the cmd-line it runs fine, but when I run it manually from the Task Scheduler the drive is not visible.

Here's the task settings that seem relevant or have been brought up in other posts:

  • user: running as admin user that has full access
  • "Run whether user is logged in or not": CHECKED
  • "Do not store password...": NOT CHECKED
  • "Run with highest priviledges": CHECKED
  • "Configure for": "Windows Vista or Windows Server 2008"

I've created a most minimal test program that runs with the same results: runs fine from cmd-line, fails to see drive when run from Task Manager.

require 'pp'
# I removed our IP address, but it was there in my tests
path = '\\\\NNN.NNN.NNN.NNN\\external data\\download'

File.open'test_out.txt', 'a'  do |file|
    file.puts '---running test at: ' + Time.now.to_s
    file.puts '---dir listing of current (local) dir:'
    file.puts Dir.entries('.')
    file.puts '---dir listing of a network dir:'
    file.puts Dir.entries(path)
end

I've inquired to our IT dept about any changes they've made that might be related and they got nothing.

Any help would be appreciated

dgbillotte
  • 113
  • 9
  • I should note that the code is written in ruby and while running ruby on Windows is less than ideal, I don't see any indication that the problem that I'm seeing is related to the oddities/head-aches that come up while running ruby on Windows. – dgbillotte Apr 15 '16 at 20:58
  • Are you sure the admin user in question hasn't changed his password? – Harry Johnston Apr 16 '16 at 00:53

0 Answers0