# Ignition touching project files every five minutes on Windows

**URL:** <https://forum.inductiveautomation.com/t/ignition-touching-project-files-every-five-minutes-on-windows/65488>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [October 20, 2022, 8:23pm UTC](https://forum.inductiveautomation.com/t/ignition-touching-project-files-every-five-minutes-on-windows/65488 "2022-10-20T20:23:46Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![cesrom](https://avatars.discourse-cdn.com/v4/letter/c/ea666f/32.png) [@cesrom](https://forum.inductiveautomation.com/u/cesrom)\
**Post date:** [October 20, 2022, 8:23pm UTC](https://forum.inductiveautomation.com/t/ignition-touching-project-files-every-five-minutes-on-windows/65488/1 "2022-10-20T20:23:46Z")

</div>

Hello IA,

I'd like to raise an issue here, as I do see a potential problem when using Source Control for our projects.

In my experience Ignition is **touching project files every five minutes** , which modifies the `actor`, `timestamp`, and `lastModificationSignature` values found in each `resource.json` for `code.py`, `config.json` and `props.json` files.

I've installed 8.1.20 on both macOS via Homebrew and on Windows via scoop, and 8.1.21 via the ZIP file; both Gateways running on Windows appear to be affected by the same problem.

Steps to reproduce:

1. Install Ignition 8.1.20 or 8.1.21
2. Clone an Ignition project into `%IGNITION_DIR%\data\projects`
3. Leave untouched and within five minutes you'll see `resource.json` files have been modified
4. Run `git restore .` (assuming you're using `git`) and wait five minutes to see those files modified by `external`
5. Rinse and repeat

If I don't restore them (`git restore .`), the files are no longer modified; this appears to only happen once. But if I restore the files to their original state, every five minutes the `resource.json` files are modified.

Since I do want to keep my projects under source control, having an external actor modifying files is not desirable.

Please fix this.

Thanks,  
César

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [October 20, 2022, 8:32pm UTC](https://forum.inductiveautomation.com/t/ignition-touching-project-files-every-five-minutes-on-windows/65488/2 "2022-10-20T20:32:20Z")

</div>

Whatever you are doing is leaving invalid checksums in `resource.json`. You will need to recompute them externally to avoid changes. Or commit the computations Ignition does for you after it notices.

{ That there is computed meta-data in those files is a fundamentally broken design that IA is kinda' stuck with for now. The computed meta-data should have been in separate files so they could be filtered by .gitignore. Net result is: }

Don't hold your breath waiting for this to be fixed.

Edit: You might also be suffering from line-ending conflicts....

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [October 20, 2022, 8:35pm UTC](https://forum.inductiveautomation.com/t/ignition-touching-project-files-every-five-minutes-on-windows/65488/3 "2022-10-20T20:35:41Z")

</div>

See also this topic:

> [@What's your method for resolving resource.json git conflicts?](https://forum.inductiveautomation.com/t/whats-your-method-for-resolving-resource-json-git-conflicts/60096):
>
> My colleagues and I try to follow a pretty normal git development flow: we implement things on temporary branches and do peer-reviewed pull requests to merge those into a main “develop” branch. And after some period of testing and vetting, the “develop” branch is then pulled into a “production” branch. We still have to be cautious and avoid more than one of us working on the same binary file at the same time, but we’ve been able to work on the same view or script and git was able to merge chang…

---

<div class="post-metadata">

**Author:** ![cesrom](https://avatars.discourse-cdn.com/v4/letter/c/ea666f/32.png) [@cesrom](https://forum.inductiveautomation.com/u/cesrom)\
**Post date:** [October 20, 2022, 8:45pm UTC](https://forum.inductiveautomation.com/t/ignition-touching-project-files-every-five-minutes-on-windows/65488/4 "2022-10-20T20:45:07Z")

</div>

> [@pturmel](#):
>
> You might also be suffering from line-ending conflicts....

That is half of the issue.

While `git` and macOS use `LF`, Windows uses `CRLF`.

I guess I could add `resource.json` to `.gitignore` and get rid of this issue. But still, what is Ignition running every five minutes?

Oh, well!

Hopefully someone from IA might like to add something.

Thanks, @pturmel.

---

<div class="post-metadata">

**Author:** ![justin.brzozoski](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justin.brzozoski/32/13452_2.png) [@justin.brzozoski](https://forum.inductiveautomation.com/u/justin.brzozoski)\
**Post date:** [October 20, 2022, 9:02pm UTC](https://forum.inductiveautomation.com/t/ignition-touching-project-files-every-five-minutes-on-windows/65488/5 "2022-10-20T21:02:40Z")

</div>

> [@cesrom](#):
>
> I guess I could add `resource.json` to `.gitignore` and get rid of this issue. But still, what is Ignition running every five minutes?

IA staff have explicitly called out ignoring `resource.json` as a bad practice:

> [@Best Practices for SVN/GIT on projects](https://forum.inductiveautomation.com/t/best-practices-for-svn-git-on-projects/30218/11):
>
> No, we have no intention of doing this. A resource is comprised of everything inside the resource directory. You should ignore nothing. We are, however, likely going to stop writing back an “externally modified” entry to the resource upon scanning it and noticing the signature is incorrect. We’ll just let it be wrong in the file and the in-memory / UI representation will still indicate there is a mismatch when necessary.

Did you read through this:

> [@Getting resource.json files under control in Git](https://forum.inductiveautomation.com/t/getting-resource-json-files-under-control-in-git/49571):
>
> Ok, so I’ve been wrestling with Git and constant changes to resource.json files detected by Git, as I hear others have. This is probably isn’t an issue at all in Linux or Mac environments, but those of us confined to Windows feel the pain. So, the reason you keep seeing resource.json files that git wants you to commit is because they get updated by Ignition whenever it sees a change in a source file (python code.py files, etc). But, my file hasn’t changed since I pulled the code.py and resour…

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [October 20, 2022, 10:39pm UTC](https://forum.inductiveautomation.com/t/ignition-touching-project-files-every-five-minutes-on-windows/65488/6 "2022-10-20T22:39:30Z")

</div>

> [@cesrom](#):
>
> But still, what is Ignition running every five minutes?

To directly answer:  
Every five minutes (by default) Ignition scans the projects directory for any modifications to files. Without that, pushing changes via Git simply wouldn't work _at all_.

Soon ™ we're planning to add a `system.project.scan` method (and a corresponding SDK hook) to make things a little more flexible for advanced users.

---

<div class="post-metadata">

**Author:** ![calimero100582](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/calimero100582/32/18630_2.png) [@calimero100582](https://forum.inductiveautomation.com/u/calimero100582)\
**Post date:** [October 20, 2022, 11:22pm UTC](https://forum.inductiveautomation.com/t/ignition-touching-project-files-every-five-minutes-on-windows/65488/7 "2022-10-20T23:22:23Z")

</div>

Do you have the same issue if you force git autocrlf for cross platform project in each environments?

See: [git - How to change line-ending settings - Stack Overflow](https://stackoverflow.com/q/10418975)

---

<div class="post-metadata">

**Author:** ![cesrom](https://avatars.discourse-cdn.com/v4/letter/c/ea666f/32.png) [@cesrom](https://forum.inductiveautomation.com/u/cesrom)\
**Post date:** [October 21, 2022, 6:29am UTC](https://forum.inductiveautomation.com/t/ignition-touching-project-files-every-five-minutes-on-windows/65488/8 "2022-10-21T06:29:04Z")

</div>

In my setup, I already had a `.gitattributes` global file. So I just had to add the following:

Before:

```plaintext
*.md diff=markdown
*.py diff=python

```

After:

```plaintext
* text=auto

*.json	text eol=lf
*.md text diff=markdown eol=lf
*.py text diff=python eol=lf

```

> [@calimero100582](#):
>
> Do you have the same issue if you force git autocrlf for cross platform project in each environments?

I had already set `autocrlf` to `true` on my `.gitconfig` global settings. But @Craig.Lovold's suggestion is what solved this issue.

Thanks everyone for your suggestions!
