# When are modules and datasets loaded?

**URL:** <https://forum.inductiveautomation.com/t/when-are-modules-and-datasets-loaded/71710>\
**Category:** Ignition\
**Created:** [March 28, 2023, 2:54pm UTC](https://forum.inductiveautomation.com/t/when-are-modules-and-datasets-loaded/71710 "2023-03-28T14:54:54Z")\
**Posts on this page:** 1\
**Showing post:** 6

<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:** [March 28, 2023, 4:12pm UTC](https://forum.inductiveautomation.com/t/when-are-modules-and-datasets-loaded/71710/6 "2023-03-28T16:12:56Z")

</div>

> [@paul-griffith](#):
>
> but the general pattern is to use an appropriate ScriptManager to "compile" into a ScriptManager.ScriptFunction that can be called with whatever args as appropriate.

Right, that is the new model for extension functions, where Ignition is supplying the `def something()`. But project library scripts can't be treated that way.

Related:

> [@Project Library Script Initialization Races](https://forum.inductiveautomation.com/t/project-library-script-initialization-races/98636):
>
> Are you annoyed by pseudo-random breakage in Ignition project library scripting? Odd top-level constants being garbled, or operations in the top level that have side effects running twice? Or more? Not happening much, but always around project edits, and sometimes even on gateway restart? Yeah, me too. frowning_face Poking around under the hood back in the spring, for a module development task, I ran across some problematic IA bytecode and pinged some people. But it went nowhere, as I co…

---

_[View the full topic](https://forum.inductiveautomation.com/t/when-are-modules-and-datasets-loaded/71710)._
