[ANSWERED]Changing schedule period

Posted on
Wed Jul 23, 2014 5:47 am
stevemac00 offline
Posts: 79
Joined: Sep 02, 2013

[ANSWERED]Changing schedule period

I have a schedule which runs every hour. But I would like to change this in a trigger script with a run period based on a variable.
I can't seem to determine how to change the period by looking at indigo.schedules[u'MySchedule']

Posted on
Thu Jul 24, 2014 2:01 pm
jay (support) offline
Site Admin
User avatar
Posts: 18221
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Changing schedule period

The IOM isn't complete for schedules, so you can't do it in Python. However, you can do it in AppleScript:

Code: Select all
tell application "IndigoServer"
    set mySchedule to time date action named "Your Schedule Name Here"
    set countdown delta of mySchedule to value of variable "NAME OF VARIABLE WITH SECONDS TO COUNTDOWN" as integer
end tell


Untested, but that's close. Note - you didn't specify exactly what part of the schedule you wanted to modify or what type is was. I just assumed it was set as one that repeats every X hours, Y minutes, Z seconds. The value that you set the countdown delta to should be the total number of seconds between each execution.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Fri Jul 25, 2014 6:13 am
stevemac00 offline
Posts: 79
Joined: Sep 02, 2013

Re: [ANSWERED]Changing schedule period

Thanks! I should've checked AS.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 6 guests

cron