Book a Demo

Author Topic: How do I schedule a report to run every night  (Read 8038 times)

Svend Erik Nygaard

  • EA User
  • **
  • Posts: 131
  • Karma: +2/-2
  • Business Information Architect
    • View Profile
How do I schedule a report to run every night
« on: April 20, 2015, 11:12:09 pm »
For instance:
Generate an HTML report each night.
I have not found such, but is there some kind of scheduler in EA?
Or do I have to call the API's RunHTMLReport () from an outside application nightly?
« Last Edit: April 20, 2015, 11:25:03 pm by svenderiknygaard »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How do I schedule a report run every night
« Reply #1 on: April 20, 2015, 11:25:00 pm »
Quote
Or do I have to call the API's RunHTMLReport () from an outside application nightly?
Yes, but be aware. EA needs an actual user to be logged in. There are all kinds of issues trying to run EA as a service.
Apparently it can be done, but it is very difficult.

Geert

Dermot

  • EA Administrator
  • EA User
  • *****
  • Posts: 591
  • Karma: +7/-0
    • View Profile

Svend Erik Nygaard

  • EA User
  • **
  • Posts: 131
  • Karma: +2/-2
  • Business Information Architect
    • View Profile
Re: How do I schedule a report to run every night
« Reply #3 on: April 22, 2015, 05:22:08 pm »
Thanks Geert and Dermot.

This kind of stuff is outside of my comfort zone - so I'll talk to some OS/service Guys on this - when time comes :-)

I guess, as an alternative to the unattended Windows service, I could just start an EA instance on the same machine from which the EA API is called?
(probably less stability/robustness, though)

If, I have a web server calling the API (from the same machine): will I be able to invoke a call2 to the API before a previous call1 has returned?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How do I schedule a report to run every night
« Reply #4 on: April 22, 2015, 06:07:25 pm »
If you are logged in you should be able to make an executable and schedule that to be executed. You just need to make sure there's always a real user logged in.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: How do I schedule a report to run every night
« Reply #5 on: April 22, 2015, 08:03:46 pm »
In the past I simply used a spare work station where a user was logged on. This way any batch could be run via any scripting machine.

q.

Svend Erik Nygaard

  • EA User
  • **
  • Posts: 131
  • Karma: +2/-2
  • Business Information Architect
    • View Profile
Re: How do I schedule a report to run every night
« Reply #6 on: April 22, 2015, 08:55:50 pm »
Thanks Geert and qwerty,
that will probably be our initial/prototype solution.

coatie

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Re: How do I schedule a report to run every night
« Reply #7 on: May 08, 2015, 07:30:19 pm »
I have some strange behaviour regarding the scheduling of scripting...
There are two powershell scripts accessing EA COM object:
No. 1 calling the ProjectTransfer function and running a transfer from Oracle-DB to standalone eap file.
No. 2 opening the model (via OpenFile2) then saving the Auditing log (SaveAuditLogs)

Both scripts run fine when called by a logged in user. Then I did setup two triggers via Windows TaskScheduler to trigger each of the scripts regularly. Both tasks are setup to be run using one of the local users.
Script 1 runs fine when called via TaskScheduler
Script 2 stops with the call of OpenFile2, EA process does not show any activity and I have to kill the process using TaskManager (did let it run for several hours)

Several things I tried:
* Running cmd.exe from TaskScheduler to start EA to see whether license is acquired correctly -> Yes it is
* Wrote a service to setup EA for Windows-System context -> Successfully done but still script 2 does get stuck
* Changed "Identity" for EA.App via comexp.msc to interactive user -> Script 2 now runs - but if I understood correctly it requires the user to be logged into the server permanently (at least when script shall run), right?

Can anybody explain that behaviour?
Is there any way to keep the powershell scripts or do I need to implement it via a service?

Markus



Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How do I schedule a report to run every night
« Reply #8 on: May 08, 2015, 08:24:03 pm »
Markus,

As far as I understood things you either have to make sure a "real" user is logged in on the machine the sheduled task is executed on, or you have to implement the "ea as unattended service" process as described in the LieberLieber paper.


Geert