Gateway Event Script Schedule

I want to run a script on gateway for the following time - (0,1,2,3,4,5,6,7,8,9,10,11,12,13:30,22:30,23) what inputs should I enter in Gateway Schedule Scripts console ?

I think you have two options:

  1. Create two schedules:
    0 0-12,23 * * * for the on-the-hour events.
    30 13,22 * * * for the 30 minutes past the hour events.
    Both would call the same script. This has the disadvantage that you have to maintain two copies of the script.
  2. Run the script every 30 minutes and exit out if it's not one of the required times.
    0,30 * * * *
    The script could be something like this (but the Python guys should be able to improve it):
hh = system.date.getHour24(system.date.now())
mm = system.date.getMinute(system.date.now())
# 13:30 and 22:30
if mm == 30:
     if not hh in [13, 22]:
        exit()
else:
     if not hh in [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 23]:
        exit()
# Add your script here.

Didn't get the Second approach. Request to explain a bit more

Do you understand how to run the script every 30 minutes useing Project Browser | Scripting | Gateway Events | Scheduled?

The script is added on the Scheduled Script | Script tab.

Do you understand the script itself? If not where are you stuck?

Got it everything now.
Thanks

Good. Try it out. If it works then mark post #2 as "Solution". Thanks.

Sure