Greetins!
I am starting a new project where in which I will write a script that needs to be triggered…
- at regular intervals (eg. daily)
- ad hoc, manually by a user
Automations work well for the first case, and scripting app for the second case. However, I wont sleep well at night if I have to maintain two copies of the script, one in Automations, one in the scripting app. What would be the best approach to not duplicating the code here?
For now I am thinking of…
- a first automation with an incoming webhook trigger that runs the actual script
- a second automation with a scheduled trigger that runs a one liner script to call the webhook (and this covers my first use case)
- a scripting app with the same one line script that calls the webhook (which covers my second use case).
Any better idea way of doing this?
Thanks in advance!
