# How to overwrite a Variable's value after every job run and use the value in the next scheduled job run?

**URL:** <https://matillioncommunity.discourse.group/t/how-to-overwrite-a-variables-value-after-every-job-run-and-use-the-value-in-the-next-scheduled-job-run/2354>\
**Category:** Matillion ETL\
**Created:** [December 18, 2023, 4:38pm UTC](https://matillioncommunity.discourse.group/t/how-to-overwrite-a-variables-value-after-every-job-run-and-use-the-value-in-the-next-scheduled-job-run/2354 "2023-12-18T16:38:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sginjupalli](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@sginjupalli](https://matillioncommunity.discourse.group/u/sginjupalli)\
**Post date:** [December 18, 2023, 4:38pm UTC](https://matillioncommunity.discourse.group/t/how-to-overwrite-a-variables-value-after-every-job-run-and-use-the-value-in-the-next-scheduled-job-run/2354/1 "2023-12-18T16:38:18Z")

</div>

I am using Python script to update the variable but I realized that the updated value is only available for the current job run and the value goes back to its default state once the job finishes.

---

<div class="post-metadata">

**Author:** ![AnudeepK](https://avatars.discourse-cdn.com/v4/letter/a/e36b37/32.png) [@AnudeepK](https://matillioncommunity.discourse.group/u/AnudeepK)\
**Post date:** [December 24, 2023, 5:15am UTC](https://matillioncommunity.discourse.group/t/how-to-overwrite-a-variables-value-after-every-job-run-and-use-the-value-in-the-next-scheduled-job-run/2354/2 "2023-12-24T05:15:34Z")

</div>

Unfortunately Matillion doesn't save the state of a variable. The best bet here could be to use Environment variables, and override everytime when the job is run. Or the best option would be to use the underlying CDP to save the value in a table. And update/retrieve it for next runs.
