Global Variables with Scheduled Runs

Is there a way to use global variables with a scheduled collection run?

I’ve set up a Workspace for exchanging data between two eCommerce platforms and I’ve built separate collections to handle the different types of exchanges. For example, one collection handles the exchange of inventory data and another handles order-related exchanges. Since all collections use the same base URLs, I’ve set them up as global variables, e.g., baseURL_A, baseURL_B, etc. Then, each request uses these base URL variables plus the specific end path it needs to access (e.g., {{baseURL_A}}/inventory, {{baseURL_A}}/orders).

When I run these collections manually using the Collection Runner, they complete successfully. However, when I run them as a Scheduled run, they fail and a quick glance at the results in the Console reveals the reason: the variables are not being replaced with their assigned values, so instead of a URL being input as myURL/api/inventory, it’s entered as http://%7B%7BbaseURL_A%7D%7D/api/inventory. Clearly the global variables are not being recognized here.

I have found other threads (1, 2) on the forum that indicate the reason is due to the fact that Scheduled runs execute in the Postman Cloud, so they can’t access global variables.

Does anyone know of a way to get these global variables to work with Scheduled runs? I could change them to Collection variables, but then I would have to add them to each collection even though they are identical values, which is why I thought this would be a perfect application for global variables. Is there a workaround or another method that allows multiple collections to share variables while also working with Scheduled runs?

Any thoughts?

I have the same problem.
Do you solve your problem?

Apparently Global Variables cannot be used with scheduled runs, but I was able to work around this limitation by changing the variables to Environment Variables. Environment Variables offer similar functionality to Globals, but you just need to select the environment before you send the requests. So when manually sending requests, you need to first select the Environment at the top-right corner of the Postman page. With Scheduled runs/Monitors, there is an Environment setting there as well; just select the Environment that has the variables that are needed for that run.

I hope this helps!

I can get variables to work when I manually run.
They can increment and all is good.

But as soon as the same script runs scheduled from the cloud, the variables are always not saved.
I’ve tried Globals - (which I’m told don’t work for scheduled)
So I tried collection variables.
And I’ve tried environment variables.

Same result.

What is going on please?

Switching to Environment variables solved my problem. When you tried that did you make sure to select the environment in the scheduled run settings?

can get variables to work when I manually run.
They can increment and all is good.

But as soon as the same script runs scheduled from the cloud, the variables are always not saved.
I’ve tried Globals - (which I’m told don’t work for scheduled)
So I tried collection variables.
And I’ve tried environment variables.

Same result.

I have the exact same issue.
I double-checked to have the correct Environment set, but I can’t access the Environment variables with scheduled runs…

Also, it’s quite counterintuitive for GLOBAL variables not to be accessible when running scheduled runs.
Or maybe it is… Because the cloud is not part of the GLOBe? :roll_eyes: