# Pause queuing for All builds mechanism via application variable setup

**URL:** https://www.finalbuilder.com/forums/t/pause-queuing-for-all-builds-mechanism-via-application-variable-setup/6787
**Category:** Discussion
**Created:** [May 27, 2020, 3:39pm UTC](https://www.finalbuilder.com/forums/t/pause-queuing-for-all-builds-mechanism-via-application-variable-setup/6787 "2020-05-27T15:39:24Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![ktopaz](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/ktopaz/32/2390_2.png) [@ktopaz](https://www.finalbuilder.com/forums/u/ktopaz)
#### Post date: [May 27, 2020, 3:39pm UTC](https://www.finalbuilder.com/forums/t/pause-queuing-for-all-builds-mechanism-via-application-variable-setup/6787/1 "2020-05-27T15:39:24Z")

</div>

Hi,

I have a tiny mechanism I implemented via an application level variable called %FreezeAllBuilds%  
And I have the following 2 conditions on each of our project configurations: (ALL of the configurations)

- ‘%FreezeAllBuilds%’ Does not equal ‘True’  
Or
- ‘%AllowedToPublishDuringFreeze%’ Contains ‘$Build.StartedBy.EmailAddress$’

This is so I, the administrator can pause queuing of new builds in case I need to for some reason (we have such cases all the time)  
It works perfect when I edit this variable manually, but I wanted a toggle button for it, so I created a tiny project and configuration that will do just that - toggle the application level variable from True to False and vice verse.  
The is simple enough : if true set false, else set true.  
But it isn’t toggling the value of the variable.  
I understand now from the documentation that application variables are read-only at run time.  
Can you suggest a way of some global tier variable that can be toggled in such a way to will give me this functionality? Or is the only way to pause / un-pause all builds on the server using my variable logic is to do it manually under Administration --\> Variables each time?

Thanks!

---

<div class="post-metadata">

### Author: ![Sparky](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/sparky/32/10_2.png) [@Sparky](https://www.finalbuilder.com/forums/u/Sparky)
#### Post date: [May 27, 2020, 11:08pm UTC](https://www.finalbuilder.com/forums/t/pause-queuing-for-all-builds-mechanism-via-application-variable-setup/6787/2 "2020-05-27T23:08:41Z")

</div>

Hi @ktopaz,

You can update application variables during a build using the [Persist Build Variable](https://wiki.finalbuilder.com/x/E4DM) build event handler.

 ![image](https://www.finalbuilder.com/forums/uploads/default/original/2X/c/cc2a942a2913e410f59fa909c3d0a7c62c0ee9b2.png)

Just ensure that the application variable is not overridden with a project or configuration variable as the value will get persisted to the most local variable.
