Script input from console ... works!

Hi the whole thing works for be but I did not get the part where you said

Put it like this with a starting “{” and a ending “}” in terminal. When using in script and schedule as stated earlier.

.
The script where I use the input (if there is nothing set in the global environment) is also scheduled to run after interval… but it fails. It only runs perfectly if i run from the terminal… Can you please help me out?