Why are my collection variables not used in scheduled runs?

I have a collection that when I run it manually, it passes.
However, when I scheduled the collection to run it failed. I was getting a 422 when doing a POST request. I added some logging of the request body so I could see what was being sent in the Scheduled Run’s console log. I had empty variables.
Scheduled Runs seems to only use environment variables and ignores collection variables?
Is this correct behavior?

Hey @lunar-module-operat5! Scheduled Runs do indeed use collection variables. One common reason for differences in local vs. cloud-based runs is the usage of current vs. initial variable values. The “Current” variable values aren’t synced to the servers, while the “Initial” values can be. This means Scheduled Runs, Monitors, Mocks, etc. will all use the Initial values of variables. There may be other differences between the local and scheduled runs as well – e.g. the cookie jar.

This is for Scheduled Runs. It works with local runs. I made sure that I had initial values for the collection variables. When I ran the Scheduled Run, the collection variable values I had ouput to the console log, were empty.

try to replace all variables to ‘collection’ level

I wanted to have some variables at collection level and the remainder as environment variables. Is this not possible? It’s one or the other?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.