Book a Demo

Author Topic: Problems using Windows scheduler running EA tasks  (Read 5501 times)

MBrandt

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Problems using Windows scheduler running EA tasks
« on: April 19, 2013, 05:39:25 pm »
Hello,

I have the following problem. I wrote a small C# program to generate HTML reports from our EA database. This program works perfectly when I run it manually from my machine (or any other PC in the network). Now I want to run it each night using the standard Windows (2008R2) scheduler.

In the settings of a scheduled task there are 2 options: 1. "Run only when user is logged on" and 2. "Run whether user is logged on or not". When I pick the first option everything is still working fine, but when I switch to option 2. the process does start (I can even see an EA.exe process in the task manager) but then nothing happens. The process seems to get stuck or wait for something (perhaps it has something to do with the EA license?).

I am using EA 10 with a floating license installed on a network server. I am sure no one else is using EA when I run my tests. I run both the option 1. and option 2. test multiple times from the same machine and option 1. works every time and option 2. never works.

Ahyone having a suggestion on what can cause this problem?
« Last Edit: April 19, 2013, 05:40:50 pm by mbrandt »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Problems using Windows scheduler running EA ta
« Reply #1 on: April 19, 2013, 06:47:54 pm »
EA needs a user. Without it will prompt for the user name. And that will ask at Nirwana if run as task. There are a number of threads having discussed this topic. If you are trying to search for them: be patient, use the Search button top left, extend for one year, be even more patient.

q.

MBrandt

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Problems using Windows scheduler running EA ta
« Reply #2 on: April 19, 2013, 06:59:54 pm »
Thanks for the quick response qwerty. I did search a lot of the threads but could not find a solution (perhaps I did not search good enough). When you specify the option "Run whether user is logged on or not" you get a prompt dialogue for a user+password so I assume that will be the user the scheduled task is using when I am not logged on.

I assume a lot of people who are using EA are using the same kind of techniques (generating stuff from a model) without being logged on while doing so. So I expect there must be a way to schedule EA automation jobs to run at night without users needing to be logged on.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Problems using Windows scheduler running EA ta
« Reply #3 on: April 19, 2013, 07:18:35 pm »
It is possible, but i don't remember the details.
The solution is buried in this forum somewhere.

IIRC there's also a whitepaper on running EA as a service somewhere (try google). That might come in handy as well.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Problems using Windows scheduler running EA ta
« Reply #4 on: April 19, 2013, 09:11:51 pm »
I never tried to hook up an EA service, but there is a method OpenFile2 which allows you to supply user/password. Have you tried that?

q.

MBrandt

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Problems using Windows scheduler running EA ta
« Reply #5 on: April 19, 2013, 09:27:30 pm »
Hello, thank you both for answering.

Yes I did try the OpenFile2 but that did not help either, I also tried opening a EA SQL database instead of an .eap file by passing it the SQL connection string but also without any luck.

I found the following document when following up Geert's option: http://www.lieberlieber.com/fileadmin/user_upload/White_Paper/2012-1.0-Publication-EA-as-an-unattended-Windows-Service-on-Windows-Server-2008R2-and-high.pdf

Perhaps I can get something to work from that explanation (I am trying that right now).

At least it made me think that Windows is probably trying to launch the EA.exe under the "Local System" account instead of the account I specify in the Task Scheduler. The pdf above mentions a "trick" to activate an EA license key for the "Local Account" user (which I am gonna try now).

I keep you posted if this fixes my problem.