Triggering a script in 2nd Project

Find and share HowTos to various installations / configurations!
3 posts • Page 1 of 1
riso77
Posts:16
Joined: Mon Jan 15, 2018 10:57 am

Triggering a script in 2nd Project

Post by riso77 »

Hello,

I have two projects running. At a certain point (file was succesfully closed in the 1st project) I want to start a script in the 2nd project.
What is the best way to do it? How do I pass the information and trigger the script in the 2nd project?

thanks

Richard

mkoller
Posts:741
Joined: Fri Sep 17, 2010 9:03 am

Re: Triggering a script in 2nd Project

Post by mkoller »

In a distributed system, you would set a datapoint and the other script would dpConnect() to this.

RudiKreiner
Posts:198
Joined: Mon May 16, 2011 2:10 pm

Re: Triggering a script in 2nd Project

Post by RudiKreiner »

but if you don't have a distributed system, then you could write a script in the second siystem with a timer that periodically checks for the existence of the file you are waiting for.
To make sure that your second system doesn't start to read the file before the first system is finished writing to it,
it is good practice to have the first system write to a temporary file name, then rename the file when done.

Passing the info in a datapoint in a distributed system is definitely more elegant but if you don't want to go to the trouble of setting that up, then this could be a cheap and dirty but sufficient way to do it, depending on your use case.

3 posts • Page 1 of 1