Kapacitor: update / reload scripts only when changed

Hello all,

Is there a way to easily figure out whether a tick script has changed or is new before updating and reloading it?
I have a script to add / update tick scripts automatically, but the trouble is that when updating all tasks, even if they have not changed, they loose their state, which is undesirable. Thus I really want to only update / reload changed tasks.

Is there a way to do this?

Thanks, Flavio