Using folder for keep data of script

Post Reply
DrPrepress
Newbie
Posts: 9
Joined: Mon Oct 30, 2017 12:18 pm

Using folder for keep data of script

Post 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!
Padawan
Advanced member
Posts: 358
Joined: Mon Jun 12, 2017 8:48 pm
Location: Belgium
Contact:

Re: Using folder for keep data of script

Post 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.
DrPrepress
Newbie
Posts: 9
Joined: Mon Oct 30, 2017 12:18 pm

Re: Using folder for keep data of script

Post 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!
Post Reply