there’s too much to learn about automation scripts.
I wonder if I have a script that runs every two hours and I want to stop it temporarily for example 8 hours then resume it.
I wonder if there is a solution without removing the trigger from the script and redeploying
do we have a simpler solution?
Take a look at the cron expression syntax; you can define nearly anything with those.
Worst case, you can define multiple cron expressions, for example:
maybe I didn’t explain my situation very well
my question is not about defining cron expressions
my question about stopping and resuming a script manually at anytime
for example, my scripts depend on an external service, and the external service has a failure for any reason … so if the developers of that service notify me they have issues I want to stop my scripts till they fix the issues
Aha, my bad…
What I would do, in this case, I would create a little
config module where I would have a checkbox indicating if a service is working or now.
In the automation script, at the start of it, I would check if the checkbox is checked or not.
If not, end the script, else run it.
Alternatively, if you can just use their API at the start of the script to check if it is accessible that would probably be the best solution.
If you prefer you can comment out the trigger and re-deploy, but the above solutions seem more fitting to me.
@tjerman a config module and checkbox field for each script sound reasonable … thanks