Can I reset an xtrigger?

Hi Tim,

Good question!

Currently xtriggers cannot be unset, but there is a somewhat ugly workaround.

  • First try to arrange it so that this should not be necessary! E.g. in your contrived example, the xtrigger should check that the externally-generated file is complete and valid, not just present.

  • But if you really need to do it, here’s how: xtrigger calls are uniquely identified and tracked (by Cylc) by function signature, i.e. the complete ordered list of arguments and their values. So, you can add a dummy argument to the xtrigger function, force_retry say, that is not used inside the function, but if you increment the value passed in from the suite definition, then reload the suite, the xtrigger will then be new and unsatisfied, and so Cylc will start calling it again until it is satisfied.

(I know I originally intended to allow explicit xtrigger reset, which would obviously be better than this, but it seems to have dropped off the radar … I’ll post an Issue)