Is it posible to change the execution time for a script?

3 posts / 0 new
Last post
jsandoval
Offline
Joined: 03/01/2021 - 10:48
Is it posible to change the execution time for a script?

Hello Everyone,
 
What I'm trying to do is running an IdeaScript wich calls a python program, that program makes a transformation of the data and then create a csv which is taken by IDEA again. But the problem I have is that IDEA execute the script too fast, so the csv is not generated on time to IDEA. That is the reason why I want to delay the time of execution to give python some time to generate the file that IDEA requests.
 
I don't have this problem when I execute the script on my computer but I need this program to be executed on a network and that's when the problem starts.

Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

Hi jsandoval,

There are a couple of options, have you thought of writing the entire code in python and not using any IDEAScript?  All the IDEAScript functions are available through python so anything you can write in IDEAScript you can also do in python.  

Also if you are using the latest version of IDEA there is a module that installs with IDEA called IDEALib.py.  It has functionality that allows you to easily read a file into Python (into a panda dataframe) and export the dataframe back to IDEA.  This might also be an option for your project.

jsandoval
Offline
Joined: 03/01/2021 - 10:48

Hi Brian, 
Thank you!!  using IDEALib.py would definitely be the best option. Do you have any example of how to use it for doing what you told me?