05-31-2013 12:22 PM - edited 03-01-2019 09:01 AM
I am trying to convert a windows scheduled task that starts MS access and then runs a macro to run in Tidal. The scheduled task is built to start Access using the "start a program" option: "C:\Program Files (x86)\Microsoft Office\Office14\MSACCESS.EXE". The "Add arguements" section contains the operation to run "C:\file path\xxx Customer Query.accdb" /cmd "xxx".
Has anyone set up something similar for Tidal? Any pointers is appreciated.
Solved! Go to Solution.
06-03-2013 07:10 AM
For a Windows Server (I am also assuming you are using a windows Agent) I see a couple of solutions and depending on your needs
Assumptions
1.) you can use Powershell to Run the Windows Scheduled Task by Name
Invoke-Command -ComputerName
2.) you can use Powershell to run the MSAccess program directly with params in -scriptbloclk { section } something like this
"C:\Program Files (x86)\Microsoft Office\Office14\MSACCESS.EXE C:\file path\xxx Customer Query.accdb" /cmd "xxx"
You would have to verify this works manually or apply some other solution (The Catch)
If you struggle I would add the code you see to an autoexec macro in the access program and then call it directly (MS Sccess will open run the macro manually). This might be more desireable for a number of reasons.
The Catch: How do you know you were sucessful? Does it produce a file? if not you may want to have it write somehting out that you can use as a file dependecy on a downstream job, a second job in this group could then tag the file lets say with datetime
Hope this helps!
Marc
06-03-2013 07:10 AM
For a Windows Server (I am also assuming you are using a windows Agent) I see a couple of solutions and depending on your needs
Assumptions
1.) you can use Powershell to Run the Windows Scheduled Task by Name
Invoke-Command -ComputerName
2.) you can use Powershell to run the MSAccess program directly with params in -scriptbloclk { section } something like this
"C:\Program Files (x86)\Microsoft Office\Office14\MSACCESS.EXE C:\file path\xxx Customer Query.accdb" /cmd "xxx"
You would have to verify this works manually or apply some other solution (The Catch)
If you struggle I would add the code you see to an autoexec macro in the access program and then call it directly (MS Sccess will open run the macro manually). This might be more desireable for a number of reasons.
The Catch: How do you know you were sucessful? Does it produce a file? if not you may want to have it write somehting out that you can use as a file dependecy on a downstream job, a second job in this group could then tag the file lets say with datetime
Hope this helps!
Marc
06-03-2013 10:11 AM
Thanks Marc, this is very helpful.
I have a PS script working two thirds of the way so far (will open Access and the Database), right now trying to get PS to interpret the /cmd "xxx" portion to actually kick off the macro.
When the macros completes there is an email that gets generated that I could leverage as a completion trigger.
06-11-2013 10:00 AM
I was able to complete the job automation using a .bat script (yeah, old school I know), I also needed to add the reg key JobUseDefDesktop and check the "For UNIX, source user's profile" option to force access opening an the default desktop and the macro command to run correctly.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide