1.2k questions

1.4k answers

361 comments

339 users

Categories

Sidebar
0 votes
489 views
by michael-h-7026 (120 points)
I would like to set the CRON to only run on full moons, and if there is two full moons in one month to skip the second full moon.

1 Answer

0 votes
Unfortunately, there's isn't a way to programatically change the CRON string for a channel.

However, you could set up a custom script to run on a particular schedule (say, once a day) which made an API call using qie.callRESTWebService() for the current moon phase and, if it matched the specific criteria desired, use qie.addInboundMessage() to submit the message at the right time.

Also note that you can add multiple CRON strings to a source node, so if you already know the dates/times of the full moon, you can add them in this format:

0 0 18 * * MON-FRI | 0 0 12 * * SAT,SUN

However, this would not address the second full moon issue.  The best way to handle that is with a custom script.
by jon-t-7005 (8.2k points)
...