Como hacer en un trigger de code snippet para que se ejecute una vez al día

Como hacer en un trigger de code snippet para que se ejecute una vez al día

anesanchez
Not applicable
105 Views
1 Reply
Message 1 of 2

Como hacer en un trigger de code snippet para que se ejecute una vez al día

anesanchez
Not applicable

[ FlexSim 23.0.15 ]

hola, quiero rellenar mi codigo diciendole que ejecute una vez al día (cada 1440min ya que esta en minutos)

int NF;

treenode queue = node("Buffer FP 1", model());

NF =content(queue) - gettablenum("Demand daily", item.Ref, CurrentDay);

settablenum("NF FP",item.Ref,CurrentDay,NF)


como puedo hacerlo, mediante if a poder ser

0 Likes
Accepted solutions (1)
106 Views
1 Reply
Reply (1)
Message 2 of 2

nilP8GEZ
Advocate
Advocate
Accepted solution

Hello Ane,


There are a lot of methods to do that, but you cannot create a trigger manually, so you can't be sure that it will be executed every 1440 minutes.


The easiest alternative to creating a trigger manually is to create a user event. In the user event, you can write the code you want to execute and set the repeating time.

1736501889223.png


To get data from the model, we usually use the statistic collector. It is a little more complex to understand but very powerful.

We recommend you take a look at it, because in the statistic collector, you can create result tables directly by scheduling events or at specific intervals.


Thanks!

0 Likes