I'm using Windows Server 8 and I'm having a real problem launching my Access 2010 database from Task Scheduler. As I can see the problem is not new, but I hope, if somebody found a solution, maybe they'd share it with me. This is what I've tried:

  1. Running with highest privileges,
  2. List item
  3. Run when I'm logged on or not,
  4. I have a Domain Admin permissions,
  5. The batch file, all folders, sub folders and the database have FULL permissions to my security level;

The task launches a batch file, which is supposed to run the whole thing, and it does if I run it manually. So there is no problem with the code or the script.

What I can see is that the Access file is being created, assuming that the bat file actually launched at least Access object, but id doesn't go any further.

I've also tried the VBScript:

dim accessApp
set accessApp = CreateObject("Access.Application")
' accessApp.visible = True
accessApp.OpenCurrentDataBase("\\...Path to my DB.accdb")
accessApp.Run "NameOfMyFunction"
set accessApp = nothing

No success either! Windows Server 2008 R2 Standard, SP1, 64-bit.

Here is the script from the batch file: echo PROCESS STARTED %date% %time% >>\servername\FolderName\JobLog.txt "C:\Program Files (x86)\Microsoft Office\OFFICE14\msaccess.exe" "\servername\FolderName\DbName.accdb" /x mMacroName

Task Scheduler acts like there is nothing wrong, No error messages, the history shows all steps until "Created Task Process" and doesn't go any further. I see that my database creates a lock file, but the script within the database that writes into the log file doesn't run. The goal here is to activate macro, which runs action queries (DELETE, APPEND ... all that jazz.) and at the end closes the database. As you could see I've added a line in the batch file to write into the log file before launching the database. Not doing it.

Thank you in advance for the time you spend reading this

  • There's no such thing as "Windows Server 8", so you may want to double check and let us know exactly which version of Windows you are running. Please edit your question and include the code of batch file you are trying to use. And can you give us any more information beyond "Problem launching", "No success" and "it doesn't go any further"? Do you get an error message, or entries in the event log? Does the Task Scheduler think it runs the task successfully? If not, what error code does it report? Where exactly does it get to in the script (add some logging to determine)? – Ƭᴇcʜιᴇ007 Sep 19 '14 at 15:25
  • What is the actual goal here? To run a function inside the Access DB, and exit? – Ƭᴇcʜιᴇ007 Sep 19 '14 at 15:27
  • Please edit new/updated information directly into your question. To confirm, does the date and time actually get logged when the batch is run from the task? Does Access start at all (when you run the batch via the task)? – Ƭᴇcʜιᴇ007 Sep 19 '14 at 16:41
  • Access does not start, batch file does not write into the log file if I start it from the Scheduler. If I run it manually it runs the macro and writes into the log. – detka123 Sep 19 '14 at 16:50
  • tiem to troubleshoot -- Create a bard new task, don't set "Run with highest privileges", set it to urn as your user, and have it trigger a batch file that just echos "blah" (or something) to a file on a drive on your local computer. Run the task, did the file write? If so, change the batch to log the date and time like you have currently. Run task again, does it still work? – Ƭᴇcʜιᴇ007 Sep 19 '14 at 16:58

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.