Macro that creates a task

I’m afraid that this is not possible with a plain macro. Consider Make custom macros that replace themselves with their value on first run