This works exacltly as I wanted it to. On all days except thursday my daily_forecast waits on the preceeding day’s daily_forecast. On thursdays, it has to wait on the preceeding day’s nowcast. Verified by looking at the progress in tui (the tasks do a touch and sleep).
No, xtriggers are graphed (somewhat redundantly) with the cycle point of the tasks that depend on them.
To the scheduler, an xtrigger is just some arbitrary Python function that it calls periodically with a given list of arguments. The arguments can include the cycle point of the dependent task, via string template, but the function can interpret and use its arguments however it likes. That even goes for the built-in workflow_state trigger. Its offset argument happens to be used (inside the function) to compute the cycle point of the target task in the target workflow, but the calling scheduler doesn’t know that.
The @nowcast xtrigger is in Thursday the 20th’s Cycle, and I think that’s correct. The general reasoning makes sense - that an xtrigger can be more or less anything - at the extreme I could write a python function which polls a web connected coffee machine and triggers when 5 people have brought a cappuchino.
Whether it might make sense for this particular trigger to have special behaviour… (probably not, we don’t necessarily know much about the upstream workflow, so using the cycle point from the trigger could mislead)
p.s. is your workflow_state xtrigger targeting your own workflow, not another workflow?? If so, you can do that, but it is better and clearer to use the plain graph notation for all internal dependencies if possible.
Yes, that’s kind of my point. It’s in the 20th cycle which is correct (it’s a thursday), but the date on the trigger itself could be misleading. But I think it has to do with my choice of graph options:
Without the -c option, the date on the trigger entry clearly tells me the trigger happens on the 20th.
With the -c option, I was expecting the date on which the trigger acts for some reason
The -c option is for formatting cycling graphs in a more readable way, without making other changes. I suppose we could in principle remove the cycle points from task labels in that case, given that it’s printed at the top of the cycle point box (but then, task IDs are cycle/name not just name…)