Page 1 of 1
Using folder for keep data of script
Posted: Wed Oct 30, 2019 3:33 pm
by DrPrepress
Hello!
Which folder is better to use to save the script execution data that will be required the next time it is executed?
This is not related to the job, but only to the execution of the script!
May be %TEMP% (for Windows)?
I would like to get recommendations.
Thanks!
Re: Using folder for keep data of script
Posted: Wed Oct 30, 2019 4:53 pm
by Padawan
What kind of information would you like to store?
Do you actually want to store files? Or just pieces of information?
I usually save pieces of information in two ways:
If it is job related data which needs to be available for different scripts, then I think it is best to store the info in the job private data. Info on how to read/Write is in the job class documentation.
If it is not related to a job, then I would store the info in the Switch global data. You can choose if it needs to be available after a Switch restart or not. Info on ho to read/write is in the environment class documentation.
Re: Using folder for keep data of script
Posted: Wed Oct 30, 2019 7:59 pm
by DrPrepress
Padawan wrote: ↑Wed Oct 30, 2019 4:53 pm
...
If it is not related to a job, then I would store the info in the Switch global data. You can choose if it needs to be available after a Switch restart or not. Info on ho to read/write is in the environment class documentation.
...
I need to save data about the script runs - for example, in which connection the previous task was sent.
You have to offer setGlobalData() ?
Never try. I'll try!
Thanks!