Notifications
Announcements
No record found.
Is it possible to create a .bat file to run check links after our DB backup run at 9:00 pm?
If yes, how?
*This post is locked for comments
Hi Cecile,
It is certainly possible!
You need to write a macro that will log in to GP, go through the steps to check links what you want, run it, and then log out of GP.
You can set this bat file to run as a scheduled task at whatever time you want.
The downside to using a macro is that macros are clear text and if you want to automatically log in, the username and password are going to need to be stored in the macro file.
Kind regards,
Leslie
Leslie is correct with the macro file suggestion. I use this every week to run a scheduled task on our GP server against all the companies. there is a way to avoid to have the user-id and password in the macro file, if you use the latest GP2010 R2, you'll be able to save the login infos in the registry of the system and then you don't need to provide it in the macro file (and it is stored safely in the registry, because encrypted).
Unfortunately for us, the POE reconcile that we run weekly does end with a dialog box that the macro recorder is not able to capture and thus all my efforts to discard that dialog box went dead and I can't force the logoff from the system after the process is finished, even that we have the excellent Rockton GP Toolbox installed and set for 30 min. timeout...
Hope this helps.
Thanks for your answers. Do you run checklinks for all series at one time?
Beat
Cool, how do you accomplish storing and retrieving from the registry for the macro?
Lslie
I initially thought about creating a job schedule for .bat file. I found out that there's no Dynamics GP installed on the Database server. Any thoughts on how to run this automatic checklinks?
Thanks,
Cecile
Cecile,
You could theoratically run the checklinks off any GP client (PC or other server), but since this might be a lenghty process and quite demanding in resources (CPU), I would strongly suggest to install the GP client on the server itself. It'll also make your future GP upgrades easier... but again that depends on your company's policy, which may forbid to install 'any' user application on a server. To help you for the schedule, there is a nice freeware called 'System Scheduler' from Splinterware that interacts directely with the OS and avoids you the cryptic command line stuff (or Control pannel). System scheduler is easy to setup and allows you to disable quickly a job or start it manually out of the regular schedule.
We only run the checklinks weekly on the POE module, but you could include as much as you want when you record your inital macro. Be carefull that too much modules could make the process run for several hours, and you have to manage also the report output (I send everything to a TXT file, since the report can become quite large).
Hi Leslie,
You actually don't store or retrieve anything from the system registry... you only take advantage of the new automatic login option of GP 2010... After the inital macro recording, start the GP client once more and check the box "Remember User & PAssword"... this way the credentials gets stored safely in the registry and you can delete the lines from the recorded macro. Off course this implies that the GP client is not going to be used by anyone else then the 'SA' or a PowerUser in GP that has permissions to perform the checklinks, as you don't want someone else login into GP and screw up the automatic logon (by disabling it or switching user).
I only chose the Company name from the pulldown list in the macro, so a single macro can be customized and saved under different names for each company that you have run the process in. I rather prefer this approach then switching companies in the same run, because you never know what can happend during an unattended checklinks and the worst thing would be to have the macro player being halted because of a pop-up that he could not manage. I'm scheduling 3 different jobs at a time lapse that I'm pretty sure the previous run had plenty enough time to finish, this way if one of the job stopped and didn't went to the end, It doesn't affect the other runs (and you can customize the report output file names too).
Contact me if you want more details.
Did exactly this for a client, recorded the macro to log in and run the GL posting routine, at night, ran into the issue of logging the user out, so I just created a job that used a sql query that logged out my specific user every morning at 6 a.m.
Hi Susan,
The danger of this is that you don't know the exact state of the user session and what's on the screen... Cleaning the ACTIVITY table in SQL doesn't close the application... and depending on what's on the screen this may be a bad idea to kill the user in the background.
We use the Rockton Software Toolbox to terminate gracefully the user sessions that are inactive for more then a predefined duration (i.e. 30 minutes) and this works most of the time, even for checklinks. In our case the POE Reconcile keeps a pop-up on the screen at the end of the process which I couldn't close with the macro script, nor can the RST timeout get rid of it...
Until I can figure out how to close that pop-up, I'll just close manually the session when I arrive in the morning.
Hi Beat,
Thank you for responding to my question.
I would like to know how you create the checklinks job using "system scheduler" in control panel. Do you have the script you can share to me?
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
mtabor 1