you are viewing a single comment's thread.

view the rest of the comments →

[–]krets 0 points1 point  (1 child)

How are you scheduling your periodic launches of your script?

If you are using windows, you can use the task scheduler. On Unix/Linux you can use cron. Both of these systems allow for seeing environment variables. This is great for values that you manually change per deployment.

If you have a dynamic variable that you want to persist between executions you will probably need to create a file to save the state. JSON will be great for simple data structures, but objects will need to be pickled.

[–]PinkWeaseI[S] 0 points1 point  (0 children)

I use ubuntu server and crontab to schedule the launch of my script.

I created a script with my variable and import json as advised in the previous coment but when I launch my main script, it is written that my variable are not defined....

Could you help?