Force Scan Class to Execute After Gateway Restart

I have a Scan Class that only runs when a boolean memory tag is written to. This scan class is used to build expression datasets that only need to change when new tags are added to the tag database. However, when the gateway restarts the tag doesn’t get re-populated until someone triggers that boolean memory tag. Is there any way to force expression tags to execute when the tag hasn’t been populated for a first time instead of waiting for its scan class to execute.

I know I could use memory tags to hold the datasets and then update them with a script when new tags were added.

I also have some expression tags that only need to execute once a day at 10am, but these will run into the same issue on a gateway restart so users of the system don’t understand why tags have the tag overlay with the little green question mark. Most of the issues occur when IT makes some system updates to the ignition server and re-boots the server. But i’m looking for a clean way for it to start back up.

Is there a reason you can’t trigger that memory tag as part of a gateway startup script? Does it cause any other actions or does it just allow the scan class to run to update your datasets?

Could you write to that boolean tag in a gateway startup script?

edit: @bpreston wins

At least I wasn’t the only one thinking that.

Yeah that would definitely work for what I’m seeing. I should have thought about that. Thanks for the help!

This sounds very similar to something I am working on.
I have a Driven class with a memory tag set to Any Change to scan my class.
These are all configuration tags that are not changed very often. But, I want to make sure they are loaded when the gateway starts up.
Using Ignition 7.9.13.
I have tried a couple different scripts in the gateway startup script and they do not update the scan class. But the same scripts in a button work just fine.

system.tag.scan("Scada", "ConfigChange")
PushTag = system.tag.read("PushConfigChngs").value
if PushTag:
	system.tag.write("PushConfigChngs",0)
else:
	system.tag.write("PushConfigChngs",1)

The second one will actually toggle my controlling tag, but the scan doesn’t happen.