Access 2010 Macro on Server 2008 R2 Task Scheduler Unattended -
i've seen many questions none of suggested solutions working me.
i have access 2010 macro named "main" (on 32-bit office). database contains odbc linked tables against different database servers , complex join queries compare , analyze data produce csv files importing third-party system. macro designed automatically run these queries , save results csv files later use third-party import tool.
my desire run macro "unattended" files created on set schedule regardless of whether user logged system or not. target system running server 2008 r2 (natively 64-bit windows).
many of answers see online indicate office automation macros may require user logged in office program has valid user desktop session. there several people giving opposite answer - saying can run microsoft access macro unattended using windows task scheduler option "run whether user logged on or not" selected.
the action set "start program", program/script set "c:\program files (x86)\microsoft office\office14\msaccess.exe" , arguments set "c:\test_dir\test_db.accdb" /nostartup /x main
when run scheduled task either @ set time or on-demand, completes msaccess resultcode (return value) of 2004 (equivalent 0x7d4 hex run result). viewing output folder shows no files created.
if, however, set task "security options" "run when user logged on", runs proper resultcode of 0 (0x0 hex). output files created expected in desired folder, works while i'm logged system.
please provide potential solutions if have suggestions might work. seems i've tried many alternatives must missing because nothing working scheduling unattended access macro while logged out.
i think misunderstand "run only" when user logged on. not mean going run access without "user" means if human being using computer @ time, run task.
the key issue user logged on when task supposed run?
in other words there in every case user logged on run task. (the option "run only" when logged on means if logoff , go away on holidays task not run.
however if choose run if user not logged on? computer still have user logged on when run task! problem default account computer – different current logon using testing.
so in task manager, free choose when user not logged on, better sure default machine account used task manager has permissions database or better yet specify logon in task scheduler.
i suggest use task scheduler specify user run task – , specify current same user know works.
Comments
Post a Comment